bugThe FreeType Project - Bugs: bug #39972, With some fonts, most of the...

 
 

bug #39972: With some fonts, most of the glyphs disappear with auto-hinting

Submitted by:  None
Submitted on:  Fri 06 Sep 2013 08:22:20 PM UTC  
 
Severity: 3 - NormalItem Group: None
Status: InvalidPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sun 08 Sep 2013 10:38:33 AM UTC, comment #10:

I guess you're right ;-) anyway I always listed these fonts as obsolete so it's not really important.

By the way, while rendering some of these glyphs, their bitmaps were reported to have a width but no rows, and of course an empty buffer. I guess it's been fixed too in the git version (which I haven't tested yet) but I just wanted to let you know in case it would be useful for further debugging.

Anonymous
Sun 08 Sep 2013 10:21:12 AM UTC, comment #9:

The correct solution nine years ago would have been to use the Private Unicode Area, period! This is exactly defined in the Unicode standard, and re-using the ASCII range was simply wrong.

Anyway, I maintain it's still invalid: The blue zones for Latin Glyphs are derived from selected characters in the range a-z and A-Z; punctuation characters are not part of this set, however, they are classified as being Latin, so they share the same blue zones.

The rule is very simple, so please say it hundred times with me: A font must not lie :-)

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Sun 08 Sep 2013 09:13:44 AM UTC, comment #8:

Well... These fonts are 9 years old while khmer was added to unicode only 6 years ago... so you cannot ask it to obey a rule that didn't exist by then ;-)

By the way I tested it on 730 non-unicode khmer fonts and these were the only problematic ones. And please notice it is as problematic with "latin" characters like punctuation. So I don't think it's actually invalid : as you can see the first character don't get rendered either !";%?=()x+,./ even though they are correctly encoded according to unicode...

Anonymous
Sun 08 Sep 2013 05:42:47 AM UTC, comment #7:

Thanks. I can now repeat the problem. My first test was with the current git version which works just fine. So please try the current git version. The problem should be fixed in the next release.

Note, however, that the `fix' is rather accidental (correcting a minor technical deficiency in the auto-hinter) and completely unrelated to the real problem: These Khmer fonts pretend to contain latin glyphs, since they re-use the character slots of `A', `B', etc. with Khmer characters. Consequently, FreeType's auto-hinter applies the logic for Latin glyphs to find blue hinting zones, which can completely fail, as you have experienced with version 2.5.0.1. The corrolary of the whole issue is the fact that fonts must not lie. FreeType relies on Unicode ranges, and if the ranges are incorrect, anything might happen.

I thus tag this report as `invalid', inspite of the fix which you might enjoy now :-)

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Sun 08 Sep 2013 04:38:23 AM UTC, comment #6:

Got the compilation trick.

Here is the log at size 50 and 45

(file #29046, file #29047)

Anonymous
Sat 07 Sep 2013 10:40:24 PM UTC, comment #5:

I guess I missed something since I get a "could not allocate display surface" on ftview ans I'm not an experienced compiler enough to find out what went wrong...

In the mean time I noticed most glyphs don't get rendered up until 45pt. From 46pt they get rendered but are higher than without auto-hinting. When you get higher in size the height decreases (same size around 70pt) until 117pt then at 118pt it gets again higher, same size around 210, and so on...

Anonymous
Sat 07 Sep 2013 09:57:09 AM UTC, comment #4:

It might be a 64bit issue. Please compile the FreeType library statically with debugging support, this is, simply do a static development build with

make devel
make

Then compile the demo programs, as described in the README file, and execute

FT2_DEBUG=any:7 ftview -l 1 50 KH_MXCJT.TTF &> KH_MXCJT.log

(press `q' to exit). After compressing the log file, please attach it to this bug report so that I can compare it with what I get on my 32bit GNU/Linux box.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Sat 07 Sep 2013 09:49:59 AM UTC, comment #3:

By the way, I have the same problem with the fonts from Khmer Smart Writer <http://web.archive.org/web/20110428215431/[http://cambodian.com/khmersoft.asp]>

Anonymous
Sat 07 Sep 2013 09:35:18 AM UTC, comment #2:

What do you think could be the culprit in my case?

I'm on Ubuntu 13.10 64bits with Freetype 2.5.0.1 from <https://launchpad.net/~teppic74/+archive/freetype-latest>

Anonymous
Fri 06 Sep 2013 09:49:35 PM UTC, comment #1:

I can't repeat that. After running Unw3028's `setup.exe' under Wine, I tested all seven created `KH*.TTF' fonts with the current git version of `ftview', and all glyphs are correctly shown if I force auto-hinting.

Please give more details.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Fri 06 Sep 2013 08:22:20 PM UTC, original submission:

With rendering the fonts provided with the Uppaco-Nippuen software <http://netconusa.com/yam/> most ot the glyph disappear when activating auto-hinting.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #29046:  KH_MXCJT.45.log.bz2 added by None (19KiB - application/x-bzip)
file #29047:  KH_MXCJT.50.log.bz2 added by None (70KiB - application/x-bzip)
file #29038:  autohinting-off.png added by None (35KiB - image/png)
file #29039:  autohinting-on.png added by None (17KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by wl
  • -unavailable- added by wl (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 08 Sep 2013 05:42:47 AM UTCwlStatusNeed Info=>Invalid
      Open/ClosedOpen=>Closed
    Sun 08 Sep 2013 04:38:23 AM UTCNoneAttached File-=>Added KH_MXCJT.45.log.bz2, #29046
      Attached File-=>Added KH_MXCJT.50.log.bz2, #29047
    Sat 07 Sep 2013 09:57:09 AM UTCwlCarbon-Copy-=>Added mpsuzuki
    Fri 06 Sep 2013 09:49:35 PM UTCwlStatusNone=>Need Info
      Assigned toNone=>wl
    Fri 06 Sep 2013 08:22:20 PM UTCNoneAttached File-=>Added autohinting-off.png, #29038
      Attached File-=>Added autohinting-on.png, #29039

    Back to the top


    Powered by Savane 3.1-cleanup1