[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft-devel] Bug in autofit render setup
From: |
chris |
Subject: |
[ft-devel] Bug in autofit render setup |
Date: |
Mon, 22 Aug 2005 19:38:22 +0100 (BST) |
User-agent: |
SquirrelMail/1.4.2 |
Hi,
While playing font rendering, and trying to figure out while scaling some
truetype fonts ends up with the bottom horizontal line of E, L, 2 etc is
missing. (75dpi, freetype used as an X server renderer, running on
Solaris, so using the Sun provided CourierNew.tff)
I believe the fix for is to load the glpyhs with a call to FT_Load_Glyph
with load_flags including FT_LOAD_TARGET_MONO.
However with autofit this didn't help. After delving through the code I
found that eventually font loading gets to af_loader_load_glyph in
afloader.c.
Which calls af_latin_hints_init (via the script_hints_init function pointer)
af_latin_hints_init takes the mode from metrics->root.scaler.render_mode ,
which is always 0 (RENDER_TARGET_NONE) and so never sets the useful flags
for snapping stems correctly.
Working backwards it seems that the metrics->scaler object is setup by the
call to script_metrics_scale, in this case it points to
af_latin_metrics_scale, which doesn't copy the render_mode value over.
I think that af_latin_metrics_scale should actually include the line:
metrics->root.scaler.render_mode = scaler->render_mode;
By adding the line, I now have characters appearing correctly. However
I'm not an expert on the code, so this is just a best guess as to a fix,
perhaps someone can confirm if it's the correct fix or not.
Thanks,
Chris
PS apologies for not being on the list yet, but I wanted to fire off the
email, I'll subscribe later today.
- [ft-devel] Bug in autofit render setup,
chris <=