mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-09 07:18:04 +02:00
scaled-font-subsets: Special case .notdef in a new subset
If the .notdef glyph is the first glyph in the subset to be mapped in scaled font, we do not know if the subset will scaled or unscaled. We can put it in the unscaled subset as Type1-fallback will embded an empty glyph if it can not get the path.
This commit is contained in:
parent
0d5902b716
commit
ae6fbe9e6e
1 changed files with 15 additions and 5 deletions
|
|
@ -545,11 +545,21 @@ _cairo_scaled_font_subsets_map_glyph (cairo_scaled_font_subsets_t *subsets,
|
|||
}
|
||||
|
||||
/* Glyph not found. Determine whether the glyph is outline or
|
||||
* bitmap and add to the appropriate subset */
|
||||
status = _cairo_scaled_glyph_lookup (scaled_font,
|
||||
scaled_font_glyph_index,
|
||||
CAIRO_SCALED_GLYPH_INFO_PATH,
|
||||
&scaled_glyph);
|
||||
* bitmap and add to the appropriate subset.
|
||||
*
|
||||
* glyph_index 0 (the .notdef glyph) is a special case. Some fonts
|
||||
* will return CAIRO_INT_STATUS_UNSUPPORTED when doing a
|
||||
* _scaled_glyph_lookup(_GLYPH_INFO_PATH). Type1-fallback creates
|
||||
* empty glyphs in this case so we can put the glyph in a unscaled
|
||||
* subset. */
|
||||
if (scaled_font_glyph_index == 0) {
|
||||
status = CAIRO_STATUS_SUCCESS;
|
||||
} else {
|
||||
status = _cairo_scaled_glyph_lookup (scaled_font,
|
||||
scaled_font_glyph_index,
|
||||
CAIRO_SCALED_GLYPH_INFO_PATH,
|
||||
&scaled_glyph);
|
||||
}
|
||||
if (status && status != CAIRO_INT_STATUS_UNSUPPORTED)
|
||||
return status;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue