[autofit] Fix handling of default coverages.
* src/autofit/afglobal.c (af_face_globals_compute_style_coverage): First handle non-default coverages, then the default coverage of the default script, and finally the other default coverages.
This commit is contained in:
parent
f45749b05b
commit
a42f918434
@ -1,3 +1,11 @@
|
||||
2014-01-03 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[autofit] Fix handling of default coverages.
|
||||
|
||||
* src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
|
||||
First handle non-default coverages, then the default coverage of the
|
||||
default script, and finally the other default coverages.
|
||||
|
||||
2014-01-03 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[autofit] Fix scaling of HarfBuzz shaping.
|
||||
|
@ -127,6 +127,7 @@
|
||||
FT_Byte* gstyles = globals->glyph_styles;
|
||||
FT_UInt ss;
|
||||
FT_UInt i;
|
||||
FT_UInt dflt = -1;
|
||||
|
||||
|
||||
/* the value AF_STYLE_UNASSIGNED means `uncovered glyph' */
|
||||
@ -164,6 +165,9 @@
|
||||
*/
|
||||
if ( style_class->coverage == AF_COVERAGE_DEFAULT )
|
||||
{
|
||||
if ( style_class->script == globals->module->default_script )
|
||||
dflt = ss;
|
||||
|
||||
for ( range = script_class->script_uni_ranges;
|
||||
range->first != 0;
|
||||
range++ )
|
||||
@ -192,9 +196,24 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* get glyphs not directly addressable by cmap */
|
||||
af_get_coverage( globals, style_class, gstyles );
|
||||
}
|
||||
}
|
||||
|
||||
/* get glyphs not directly addressable by cmap */
|
||||
af_get_coverage( globals, style_class, gstyles );
|
||||
/* handle the default OpenType features of the default script ... */
|
||||
af_get_coverage( globals, AF_STYLE_CLASSES_GET[dflt], gstyles );
|
||||
|
||||
/* ... and the remaining default OpenType features */
|
||||
for ( ss = 0; AF_STYLE_CLASSES_GET[ss]; ss++ )
|
||||
{
|
||||
AF_StyleClass style_class = AF_STYLE_CLASSES_GET[ss];
|
||||
|
||||
|
||||
if ( ss != dflt && style_class->coverage == AF_COVERAGE_DEFAULT )
|
||||
af_get_coverage( globals, style_class, gstyles );
|
||||
}
|
||||
|
||||
/* mark ASCII digits */
|
||||
|
Loading…
Reference in New Issue
Block a user