freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] The fastest way to query size of a rendered bitmap


From: Daniel Plakhotich
Subject: Re: [ft] The fastest way to query size of a rendered bitmap
Date: Mon, 20 Nov 2017 19:53:27 +0200

I compiled the test program with various versions of FreeType, and
v2.7.0 and newer don't return bbox > cbox, so it was a subtle bug
fixed somewhere between v2.6.5 and v2.7.0. Unfortunately, only v2.5.2
is available on Ubuntu 14.04.

Still, even with the most recent version:

  FreeType 2.8.1
  Loading DejaVuSans.ttf at 100 pt
  Checking cbox vs bbox

  Checking bitmap vs cbox
  U+07ED bitmap > cbox: {11, 10} > {11, 9}
  U+07F2 bitmap > cbox: {10, 10} > {10, 9}
  U+07F3 bitmap > cbox: {30, 10} > {30, 9}
  U+07F8 bitmap > cbox: {48, 50} > {48, 49}

I ran the program through shell script for 583 fonts, and DejaVuSans
is the only one that has this issue (at least on 100 pt).

On Mon, Nov 20, 2017 at 8:54 AM, Werner LEMBERG <address@hidden> wrote:
>
>> It seems like even FT_Outline_Get_CBox() results in smaller sizes
>> when a font is opened at really big size (I tested with 100 pt at 72
>> dpi).  The bigger size, the bigger difference is, so it's not
>> possible to fix the issue by just adding 2-3 px just in case.
>>
>> Unfortunately, manual grid fitting is not a solution to my problem.
>
> C code please C code please C code please C code please :-)
>
>
>     Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]