You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
result = newWrittenFontCFF(inObjectsContext,isCID != 0, inFontIsToBeEmbedded); // CFF fonts should know if font is to be embedded, as the embedding code involves re-encoding of glyphs
658
+
result = newWrittenFontCFF(inObjectsContext,this,isCID != 0, inFontIsToBeEmbedded); // CFF fonts should know if font is to be embedded, as the embedding code involves re-encoding of glyphs
659
659
}
660
660
elseif(strcmp(fontFormat,scTrueType) == 0)
661
661
{
662
-
result = newWrittenFontTrueType(inObjectsContext);
662
+
result = newWrittenFontTrueType(inObjectsContext, this);
// See PDF Reference 5.5.5 Character Encoding, Encodings for TrueType Fonts. When is mapping from glyph name is possible, and so non CID encoding can be built - only if font contains either of
41
+
// two possible cmaps: win unicode bmp or macintosh roman. so check if got either of those.
42
+
for(FT_Int i = 0; i < font->num_charmaps; ++i) {
43
+
FT_CharMap charmap = font->charmaps[i];
44
+
45
+
if (charmap->platform_id == 3 && charmap->encoding_id == 1)
46
+
returntrue; // Windows Unicode BMP
47
+
48
+
if (charmap->platform_id == 1 && charmap->encoding_id == 0)
1. Can encoding if/f all text codes are available through WinAnsiEncoding.
46
-
[maybe should also make sure that the font has the relevant cmaps?! Or maybe I'm just assuming that...]
68
+
[maybe should also make sure that the font has the relevant cmaps?! Or maybe I'm just assuming that...] [That's what FontHasCmapsForWinAnsiEncoding and fontSupportsWinAnsiEncoding are for]
47
69
2. While encoding use WinAnsiEncoding values, of course. This will necasserily work
48
70
3. While writing the font description simply write the WinAnsiEncoding glyph name, and pray.*/
// Gal 26/8/2017: Most of the times, the glyph IDs are CIDs. this is to retain a few requirements of True type fonts, and the case of fonts when they are not embedded.
251
-
// However, when CFF fonts are embedded, the matching code actually recreates a font from just the subset, and renumbers them based on the order
252
-
// of them joining the font. Hence, we need a slight difference for this case, and an override is provided
// Gal 26/8/2017: Most of the times, the glyph IDs are CIDs. this is to retain a few requirements of True type fonts, and the case of fonts when they are not embedded.
257
+
// However, when CFF fonts are embedded, the matching code actually recreates a font from just the subset, and renumbers them based on the order
258
+
// of them joining the font. Hence, we need a slight difference for this case, and an override is provided
0 commit comments