Really fix Savannah bug #28678 (part 2).
Since we consider `sbw' for the horizontal direction only, we still have to synthesize vertical metrics if the user wants to use the vertical writing direction. * src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c (cid_slot_load_glyph), src/type1/t1gload.c (T1_Load_Glyph): Synthesize vertical metrics (only) if FT_LOAD_VERTICAL_LAYOUT is set.
This commit is contained in:
parent
980b76ea5e
commit
63e7aac34f
15
ChangeLog
15
ChangeLog
|
@ -1,4 +1,17 @@
|
|||
2010-01-27 Ken Sharp <ken.sharp@artifex.com>
|
||||
2010-02-10 Ken Sharp <ken.sharp@artifex.com>
|
||||
|
||||
Really fix Savannah bug #28678 (part 2).
|
||||
|
||||
Since we consider `sbw' for the horizontal direction only, we still have
|
||||
to synthesize vertical metrics if the user wants to use the vertical
|
||||
writing direction.
|
||||
|
||||
* src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c
|
||||
(cid_slot_load_glyph), src/type1/t1gload.c (T1_Load_Glyph):
|
||||
Synthesize vertical metrics (only) if FT_LOAD_VERTICAL_LAYOUT is
|
||||
set.
|
||||
|
||||
2010-02-10 Ken Sharp <ken.sharp@artifex.com>
|
||||
|
||||
Really fix Savannah bug #28678 (part 1).
|
||||
|
||||
|
|
|
@ -2919,9 +2919,12 @@
|
|||
if ( has_vertical_info )
|
||||
metrics->vertBearingX = metrics->horiBearingX -
|
||||
metrics->horiAdvance / 2;
|
||||
else
|
||||
ft_synthesize_vertical_metrics( metrics,
|
||||
metrics->vertAdvance );
|
||||
else
|
||||
{
|
||||
if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
|
||||
ft_synthesize_vertical_metrics( metrics,
|
||||
metrics->vertAdvance );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -427,9 +427,12 @@
|
|||
metrics->horiBearingX = cbox.xMin;
|
||||
metrics->horiBearingY = cbox.yMax;
|
||||
|
||||
/* make up vertical ones */
|
||||
ft_synthesize_vertical_metrics( metrics,
|
||||
metrics->vertAdvance );
|
||||
if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
|
||||
{
|
||||
/* make up vertical ones */
|
||||
ft_synthesize_vertical_metrics( metrics,
|
||||
metrics->vertAdvance );
|
||||
}
|
||||
}
|
||||
|
||||
Exit:
|
||||
|
|
|
@ -401,17 +401,20 @@
|
|||
FIXED_TO_INT( decoder.builder.advance.x );
|
||||
glyph->root.internal->glyph_transformed = 0;
|
||||
|
||||
#if 0
|
||||
/* make up vertical ones */
|
||||
metrics->vertAdvance = ( face->type1.font_bbox.yMax -
|
||||
face->type1.font_bbox.yMin ) >> 16;
|
||||
glyph->root.linearVertAdvance = metrics->vertAdvance;
|
||||
#else
|
||||
metrics->vertAdvance =
|
||||
FIXED_TO_INT( decoder.builder.advance.y );
|
||||
glyph->root.linearVertAdvance =
|
||||
FIXED_TO_INT( decoder.builder.advance.y );
|
||||
#endif
|
||||
if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
|
||||
{
|
||||
/* make up vertical ones */
|
||||
metrics->vertAdvance = ( face->type1.font_bbox.yMax -
|
||||
face->type1.font_bbox.yMin ) >> 16;
|
||||
glyph->root.linearVertAdvance = metrics->vertAdvance;
|
||||
}
|
||||
else
|
||||
{
|
||||
metrics->vertAdvance =
|
||||
FIXED_TO_INT( decoder.builder.advance.y );
|
||||
glyph->root.linearVertAdvance =
|
||||
FIXED_TO_INT( decoder.builder.advance.y );
|
||||
}
|
||||
|
||||
glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;
|
||||
|
||||
|
@ -471,9 +474,12 @@
|
|||
metrics->horiBearingX = cbox.xMin;
|
||||
metrics->horiBearingY = cbox.yMax;
|
||||
|
||||
/* make up vertical ones */
|
||||
ft_synthesize_vertical_metrics( metrics,
|
||||
metrics->vertAdvance );
|
||||
if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
|
||||
{
|
||||
/* make up vertical ones */
|
||||
ft_synthesize_vertical_metrics( metrics,
|
||||
metrics->vertAdvance );
|
||||
}
|
||||
}
|
||||
|
||||
/* Set control data to the glyph charstrings. Note that this is */
|
||||
|
|
Loading…
Reference in New Issue