Re: [ft-devel] Problems in GF_Glyph_Load function.

2018-07-08 Thread Parth Wazurkar
>
> > I found the buglet, it was in `gf_free_font' function. Now, it is
> > properly allocating the `bitmap' and glyph metrics,
>
> Good!
>
> > but `ftexample' is not showing the image of the glyph.  I am not
> > able to figure out why is it not showing an image.  Can you point
> > out some possible error? Please help.
>
> Right now I'm on vacation, doing some hiking in Tyrol.  Maybe today
> evening I can have a look – in case I'm not too tired.  No promises,
> sorry.
>
Ok. No problem.
Thanks.

Parth
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Problems in GF_Glyph_Load function.

2018-07-07 Thread Werner LEMBERG

> I found the buglet, it was in `gf_free_font' function. Now, it is
> properly allocating the `bitmap' and glyph metrics,

Good!

> but `ftexample' is not showing the image of the glyph.  I am not
> able to figure out why is it not showing an image.  Can you point
> out some possible error? Please help.

Right now I'm on vacation, doing some hiking in Tyrol.  Maybe today
evening I can have a look – in case I'm not too tired.  No promises,
sorry.


Werner
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Problems in GF_Glyph_Load function.

2018-07-07 Thread Parth Wazurkar
>
> >> > While debugging through the `GF_Glyph_Load' function in
>> >> > `gfdrivr.c', I found out that the typecasting of `FT_Face' into
>> >> > `GF_Face' is not working properly.  In, `GF_Face gf =
>> >> > (GF_Face)FT_SIZE_FACE( size );', when I extract the `gf_glyph'
>> >> > element from `gf', it is unable to return the glyph bitmap table.
>> >> > Can anyone please point out where the error can be.
>> >>
>> >> Obviously, the size object doesn't contain the right GF_Face
>> >> object.
>> >
>> > But, then this way works for bdf and winfont. Why is it so?
>>
>> I guess there is a buglet somewhere...
>
>
> I checked through gdb, it shows that the address of `GF_Face' does not
> change
> and is the same as returned by `FT_SIZE_FACE', Can there be any
> other problem? please help.
> Here is the output of gdb...
>
>
> Breakpoint 1, main (argc=3, argv=0x7fffdb78) at ftexample.c:72
> 72{
> (gdb) watch -l face
> Hardware watchpoint 2: -location face
> (gdb) c
> Continuing.
> Hi I am here1
> Hi I am here2
> FT_Open_Face: Requesting face 0
> FT_Stream_Open: opened `cmr10.600gf' (24148 bytes) successfully
> TTF driver
>   SFNT driver
>   not a font using the SFNT container format
> Type 1 driver
>   not a Type 1 font
> CFF driver
>   SFNT driver
>   not a font using the SFNT container format
>   not a CFF font header
> CID driver
>   not a CID-keyed font
> PFR driver
>   not a PFR font
> Type 42 driver
>   not a Type42 font
> Windows FNT driver
>   not a Windows FNT file
> PCF driver
>   ... try gzip stream
>   ... try LZW stream
>   ... try Bzip2 stream
>   not a PCF file
> BDF driver
>   not a BDF file
> GF driver
> gf_load_font: GF_ID(131) found gf_load_font: GF_POST_POST(249) found
> gf_load_font: GF Postamble found
> gf_load_font: Allocated bitmap table
>   number of glyphs: allocated 128 go->code_min is 0 and go->code_max is 255
> FT_Open_Face: New face object, adding to list
> FT_Open_Face: Creating glyph slot
> FT_New_GlyphSlot: Creating new slot object
> FT_New_GlyphSlot: Return 0x0
> FT_Open_Face: Creating size object
>
> Hardware watchpoint 2: -location face
>
> Old value = (struct FT_FaceRec_ *) 0x7
> New value = (struct FT_FaceRec_ *) 0x557a9360
> 0x77b22c8d in ft_open_face_internal (library=0x557a84c0,
> args=args@entry=0x7fffd990, face_index=0,
> aface=0x7fffda28, test_mac_fonts=test_mac_fonts@entry=1 '\001')
> at /home/parth/freetype-devel/src/base/ftobjs.c:2623
> 2623  *aface = face;
> (gdb) c
> Continuing.
> FT_Open_Face: Return 0x0
> Hi I am here3 face->num_glyphs is 128
> FT_Request_Size (gf driver):
>   x scale: 0 (0.00)
>   y scale: 0 (0.00)
>   ascender: 0.00
>   descender: 0.00
>   height: 0.00
>   max advance: 0.00
>   x ppem: 0
>   y ppem: 0
> Hi I am here
> Hi I am here in transform
> HI I am here in FT_Load_Char and glyph_index1 is 65
> HI I am here in FT_Load_Char and glyph_index2 is 65
> Hi I reached GF_Load_Glyph gf is 0x557a9360 face is 0x557a9360 /*
> In FT_SIZE_FACE */
> GF_Glyph_Load: glyph index 65
> invalid glyph index
> go->code_min is 0 and go->code_max is 0 /* here go->code_max should be 255
> if the GF_Face is properly extracted */
>
>
>
>
>
>
> FT_Done_Library: close faces for type42
> FT_Done_Library: close faces for truetype
> FT_Done_Library: close faces for type1
> FT_Done_Library: close faces for cff
> FT_Done_Library: close faces for t1cid
> FT_Done_Library: close faces for pfr
> FT_Done_Library: close faces for type42
> FT_Done_Library: close faces for winfonts
> FT_Done_Library: close faces for pcf
> FT_Done_Library: close faces for bdf
> FT_Done_Library: close faces for gf
>
> Hardware watchpoint 2: -location face
>
> Old value = (struct FT_FaceRec_ *) 0x557a9360
> New value = (struct FT_FaceRec_ *) 0x0
> 0x773b5872 in __GI___call_tls_dtors () at
> cxa_thread_atexit_impl.c:145
> 145cxa_thread_atexit_impl.c: No such file or directory.
> (gdb) Quit
> (gdb)
>

I found the buglet, it was in `gf_free_font' function. Now, it is properly
allocating the
`bitmap' and glyph metrics, but `ftexample' is not showing the image of the
glyph.
I am not able to figure out why is it not showing an image. Can you point
out some
possible error? Please help.
This is the output from `ftexample':

FT_Request_Size (gf driver):
  x scale: 0 (0.00)
  y scale: 0 (0.00)
  ascender: 0.00
  descender: 0.00
  height: 0.00
  max advance: 0.00
  x ppem: 0
  y ppem: 0
Hi I am here
Hi I am here in transform
GF_Glyph_Load: glyph index 65
FT_Load_Glyph: index 65, flags 0x4
  x advance: 6.343750
  y advance: 2.953125
  linear x advance: 0.00
  linear y advance: 0.00
  bitmap 7x7, monochrome bitmap (mode 1)

Thank you

Parth
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Problems in GF_Glyph_Load function.

2018-07-06 Thread Parth Wazurkar
>
> >> > While debugging through the `GF_Glyph_Load' function in
> >> > `gfdrivr.c', I found out that the typecasting of `FT_Face' into
> >> > `GF_Face' is not working properly.  In, `GF_Face gf =
> >> > (GF_Face)FT_SIZE_FACE( size );', when I extract the `gf_glyph'
> >> > element from `gf', it is unable to return the glyph bitmap table.
> >> > Can anyone please point out where the error can be.
> >>
> >> Obviously, the size object doesn't contain the right GF_Face
> >> object.
> >
> > But, then this way works for bdf and winfont. Why is it so?
>
> I guess there is a buglet somewhere...


I checked through gdb, it shows that the address of `GF_Face' does not
change
and is the same as returned by `FT_SIZE_FACE', Can there be any
other problem? please help.
Here is the output of gdb...


Breakpoint 1, main (argc=3, argv=0x7fffdb78) at ftexample.c:72
72{
(gdb) watch -l face
Hardware watchpoint 2: -location face
(gdb) c
Continuing.
Hi I am here1
Hi I am here2
FT_Open_Face: Requesting face 0
FT_Stream_Open: opened `cmr10.600gf' (24148 bytes) successfully
TTF driver
  SFNT driver
  not a font using the SFNT container format
Type 1 driver
  not a Type 1 font
CFF driver
  SFNT driver
  not a font using the SFNT container format
  not a CFF font header
CID driver
  not a CID-keyed font
PFR driver
  not a PFR font
Type 42 driver
  not a Type42 font
Windows FNT driver
  not a Windows FNT file
PCF driver
  ... try gzip stream
  ... try LZW stream
  ... try Bzip2 stream
  not a PCF file
BDF driver
  not a BDF file
GF driver
gf_load_font: GF_ID(131) found gf_load_font: GF_POST_POST(249) found
gf_load_font: GF Postamble found
gf_load_font: Allocated bitmap table
  number of glyphs: allocated 128 go->code_min is 0 and go->code_max is 255
FT_Open_Face: New face object, adding to list
FT_Open_Face: Creating glyph slot
FT_New_GlyphSlot: Creating new slot object
FT_New_GlyphSlot: Return 0x0
FT_Open_Face: Creating size object

Hardware watchpoint 2: -location face

Old value = (struct FT_FaceRec_ *) 0x7
New value = (struct FT_FaceRec_ *) 0x557a9360
0x77b22c8d in ft_open_face_internal (library=0x557a84c0,
args=args@entry=0x7fffd990, face_index=0,
aface=0x7fffda28, test_mac_fonts=test_mac_fonts@entry=1 '\001') at
/home/parth/freetype-devel/src/base/ftobjs.c:2623
2623  *aface = face;
(gdb) c
Continuing.
FT_Open_Face: Return 0x0
Hi I am here3 face->num_glyphs is 128
FT_Request_Size (gf driver):
  x scale: 0 (0.00)
  y scale: 0 (0.00)
  ascender: 0.00
  descender: 0.00
  height: 0.00
  max advance: 0.00
  x ppem: 0
  y ppem: 0
Hi I am here
Hi I am here in transform
HI I am here in FT_Load_Char and glyph_index1 is 65
HI I am here in FT_Load_Char and glyph_index2 is 65
Hi I reached GF_Load_Glyph gf is 0x557a9360 face is 0x557a9360 /*
In FT_SIZE_FACE */
GF_Glyph_Load: glyph index 65
invalid glyph index
go->code_min is 0 and go->code_max is 0 /* here go->code_max should be 255
if the GF_Face is properly extracted */












FT_Done_Library: close faces for type42
FT_Done_Library: close faces for truetype
FT_Done_Library: close faces for type1
FT_Done_Library: close faces for cff
FT_Done_Library: close faces for t1cid
FT_Done_Library: close faces for pfr
FT_Done_Library: close faces for type42
FT_Done_Library: close faces for winfonts
FT_Done_Library: close faces for pcf
FT_Done_Library: close faces for bdf
FT_Done_Library: close faces for gf

Hardware watchpoint 2: -location face

Old value = (struct FT_FaceRec_ *) 0x557a9360
New value = (struct FT_FaceRec_ *) 0x0
0x773b5872 in __GI___call_tls_dtors () at
cxa_thread_atexit_impl.c:145
145cxa_thread_atexit_impl.c: No such file or directory.
(gdb) Quit
(gdb)


Thank you

Parth
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Problems in GF_Glyph_Load function.

2018-07-06 Thread Werner LEMBERG


>> > While debugging through the `GF_Glyph_Load' function in
>> > `gfdrivr.c', I found out that the typecasting of `FT_Face' into
>> > `GF_Face' is not working properly.  In, `GF_Face gf =
>> > (GF_Face)FT_SIZE_FACE( size );', when I extract the `gf_glyph'
>> > element from `gf', it is unable to return the glyph bitmap table.
>> > Can anyone please point out where the error can be.
>>
>> Obviously, the size object doesn't contain the right GF_Face
>> object.
> 
> But, then this way works for bdf and winfont. Why is it so?

I guess there is a buglet somewhere...


Werner

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Problems in GF_Glyph_Load function.

2018-07-06 Thread Parth Wazurkar
>
> > While debugging through the `GF_Glyph_Load' function in `gfdrivr.c',
> > I found out that the typecasting of `FT_Face' into `GF_Face' is not
> > working properly.  In, `GF_Face gf = (GF_Face)FT_SIZE_FACE( size
> > );', when I extract the `gf_glyph' element from `gf', it is unable
> > to return the glyph bitmap table.  Can anyone please point out where
> > the error can be.
>
> Obviously, the size object doesn't contain the right GF_Face object.
>

But, then this way works for bdf and winfont. Why is it so?

Hard to say more without running the debugger.  I suggest that you
> check the address of the created GF_Face object; it should be the same
> as returned by FT_SIZE_FACE.  If you get a different address you have
> to find out where the FT_Face object within FT_Size is set and
> possibly changed.  To track changes, you can probably use the
>
>   watch -l ...
>
> command within gdb.
>

Ok, I'll do that. Thanks.
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Problems in GF_Glyph_Load function.

2018-07-06 Thread Werner LEMBERG


> While debugging through the `GF_Glyph_Load' function in `gfdrivr.c',
> I found out that the typecasting of `FT_Face' into `GF_Face' is not
> working properly.  In, `GF_Face gf = (GF_Face)FT_SIZE_FACE( size
> );', when I extract the `gf_glyph' element from `gf', it is unable
> to return the glyph bitmap table.  Can anyone please point out where
> the error can be.

Obviously, the size object doesn't contain the right GF_Face object.

Hard to say more without running the debugger.  I suggest that you
check the address of the created GF_Face object; it should be the same
as returned by FT_SIZE_FACE.  If you get a different address you have
to find out where the FT_Face object within FT_Size is set and
possibly changed.  To track changes, you can probably use the

  watch -l ...

command within gdb.


Werner

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


[ft-devel] Problems in GF_Glyph_Load function.

2018-07-06 Thread Parth Wazurkar
Hi all,
While debugging through the `GF_Glyph_Load' function in
`gfdrivr.c', I found out that the typecasting of `FT_Face' into
`GF_Face' is not working properly.
In, `GF_Face  gf = (GF_Face)FT_SIZE_FACE( size );',
when I extract the `gf_glyph' element from `gf', it is unable
to return the glyph bitmap table.
Can anyone please point out where the error can be.
Please help.

Thank you

Parth
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel