Werner LEMBERG | 2 Nov 2009 07:22
Picon

Re: [ft] FT_Pos clarification (Typo?)


> I'm wondering if there's a typo in the FT_Pos docs, at:
> http://freetype.sourceforge.net/freetype2/docs/reference/ft2-basic_types.html#FT_Pos
> 
> It's described as a *32-bit* integer, but is typedef'd to be a *long*.
> On LP64 systems (Like x64 Linux), a long is actually *64* bits - See
> http://en.wikipedia.org/wiki/LP64#Specific_data_models

It's a typo, or rather, it stems from the time where nobody took care
of 64bit systems.  Thanks for spotting; I've fixed it in the git.

    Werner
Werner LEMBERG | 3 Nov 2009 15:49
Picon

Re: [ft] Embedded Bitmaps, Load_Glyph and linearHoriAdvance


>> I am trying to trace a problem I am having loading a font.  The
>> glyph appears not to have its linearHoriAdvance field set.  [...]
> 
> Probably a bug. [...]

This should be fixed now in the git repository.  Please test.

    Werner
Jeremy Manson | 4 Nov 2009 20:36
Picon

Re: [ft] Embedded Bitmaps, Load_Glyph and linearHoriAdvance

That seems to work.  Thanks a lot for being so responsive on this, Werner!

Jeremy

On Tue, Nov 3, 2009 at 6:49 AM, Werner LEMBERG <wl <at> gnu.org> wrote:
>
>>> I am trying to trace a problem I am having loading a font.  The
>>> glyph appears not to have its linearHoriAdvance field set.  [...]
>>
>> Probably a bug. [...]
>
> This should be fixed now in the git repository.  Please test.
>
>
>    Werner
>
Jeremy Manson | 5 Nov 2009 20:21
Picon

Re: [ft] Embedded Bitmaps, Load_Glyph and linearHoriAdvance

BTW, there's now a compiler warning in ttgload.c:

libtool: compile:  gcc -pedantic -ansi -Wall
-Ifreetype/freetype-2.3.11/objs -I./builds/unix
-Ifreetype/freetype-2.3.11/include -c -Wall -g -O2
-DFT_CONFIG_OPTION_SYSTEM_ZLIB "-DFT_CONFIG_CONFIG_H=<ftconfig.h>"
-DFT2_BUILD_LIBRARY "-DFT_CONFIG_MODULES_H=<ftmodule.h>"
-Ifreetype/freetype-2.3.11/src/truetype
freetype/freetype-2.3.11/src/truetype/truetype.c  -fPIC -DPIC -o
freetype/freetype-2.3.11/objs/.libs/truetype.o
freetype/freetype-2.3.11/src/truetype/ttgload.c: In function
'load_truetype_glyph':
freetype/freetype-2.3.11/src/truetype/ttgload.c:1108: warning: 'error'
may be used uninitialized in this function

I fixed it by setting error = TT_Err_Ok at the beginning of the
function, but this may or may not be the correct fix.

Jeremy

On Wed, Nov 4, 2009 at 11:36 AM, Jeremy Manson <jeremy.manson <at> gmail.com> wrote:
> That seems to work.  Thanks a lot for being so responsive on this, Werner!
>
> Jeremy
>
> On Tue, Nov 3, 2009 at 6:49 AM, Werner LEMBERG <wl <at> gnu.org> wrote:
>>
>>>> I am trying to trace a problem I am having loading a font.  The
>>>> glyph appears not to have its linearHoriAdvance field set.  [...]
>>>
(Continue reading)

lunafox | 6 Nov 2009 10:30
Picon
Favicon

[ft] How to get the character code from a glyph index?


As I know, FT_Get_Char_Index() is to retrieve the glyph index given a
character code.

Does there exist a reverse function?

Thanks in advance.

lunafox
--

-- 
View this message in context: http://old.nabble.com/How-to-get-the-character-code-from-a-glyph-index--tp26228798p26228798.html
Sent from the Freetype - User mailing list archive at Nabble.com.
Werner LEMBERG | 8 Nov 2009 07:45
Picon

Re: [ft] How to get the character code from a glyph index?


> As I know, FT_Get_Char_Index() is to retrieve the glyph index given
> a character code.
> 
> Does there exist a reverse function?

No.  The problem is that there is no one-to-one mapping.  For example,
many fonts use a single glyph for all character codes which are
unknown.  Additionally, at least for TrueType and OpenType fonts, it
is basically impossible to get this information if glyph substitution
within glyph contexts is active, as necessary for e.g. Arabic or Indic
scripts.  An extreme example might be that the character `A' maps to
seven glyphs which appear as the string `America'.

    Werner
Werner LEMBERG | 8 Nov 2009 07:59
Picon

Re: [ft] Embedded Bitmaps, Load_Glyph and linearHoriAdvance

> BTW, there's now a compiler warning in ttgload.c: [...]
>
> I fixed it by setting error = TT_Err_Ok at the beginning of the
> function,

This is the right fix, no in the git repository.  Thanks.

    Werner
Sherwood Hu | 9 Nov 2009 21:27

[ft] Glyph rendered with different bitmap width

I noticed a problem when I render a true type font.

 

All gyphs in the font have a fixed width of 550 font units. Its EM size is 1024. So at 29.5 points and 600 dpi, all glyphs should have a width of 132 dots, according to:

 

29.5*550/(72*1024) = 0.22 (inch) * 600 = 132.

 

Unfortunately I got different results from 98 dots to 132 dots –quite a wide range.

 

What may cause the problem? The width is quite important for the results. Is there any way I can work around the issue?

 

Thanks!

_______________________________________________
Freetype mailing list
Freetype <at> nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype
Werner LEMBERG | 9 Nov 2009 22:44
Picon

Re: [ft] Glyph rendered with different bitmap width


> All gyphs in the font have a fixed width of 550 font units. Its EM
> size is 1024. So at 29.5 points and 600 dpi, all glyphs should have
> a width of 132 dots, according to:
>
> 29.5*550/(72*1024) = 0.22 (inch) * 600 = 132.
>
> Unfortunately I got different results from 98 dots to 132 dots
> -quite a wide range.

This is not sufficient information.  Please provide a small
*compilable* code snippet together with the font which demonstrates
the problem.  In case the font is not free, please send it to me
privately for further investigation.

    Werner
Basil Saji | 19 Nov 2009 11:42
Picon

[ft] Freetype cross compiling for ARM boards

My name is Basil. I am trying to port the freetype library to a arm development board. I am using the arm cross compiler executable
arm-none-linux-gnueabi and i followed the instructions in INSTALL.CROSS but i am unable to create a configuration file for freetype.

This is the input i have given
basil <at> Bas:~/Desktop/Freetype/

freetype-2.3.11$ ./configure --build=i686-pc-linux-gnu --host=arm-none-linux-gnueabi

The output i got was

FreeType build system -- automatic system detection

The following settings are used:

  platform                    unix
  compiler                    cc
  configuration directory     ./builds/unix
  configuration rules         ./builds/unix/unix.mk

If this does not correspond to your system or settings please remove the file
`config.mk' from this directory then read the INSTALL file for help.

Otherwise, simply type `make' again to build the library,
or `make refdoc' to build the API reference (the latter needs python).

cd builds/unix; ./configure  '--build=i686-pc-linux-gnu' '--host=arm-none-linux-gnueabi'
checking build system type... i686-pc-linux-gnu
checking host system type... arm-none-linux-gnueabi
checking for arm-none-linux-gnueabi-gcc... arm-none-linux-gnueabi-gcc
checking for C compiler default output file name...
configure: error: in `/home/basil/Desktop/Freetype/freetype-2.3.11/builds/unix':
configure: error: C compiler cannot create executables
See `config.log' for more details.
make: *** [setup] Error 77

Kindly let me know whether i am missing any step in the process



--
The end is only the beginning
_______________________________________________
Freetype mailing list
Freetype <at> nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype

Gmane