DynaPDF Manual - Page 698
Previous Page 697 Index Next Page 699
Function Reference
Page 698 of 839
Vertical Writing Mode
When using a CMap for vertical writing mode the text extends always from top to bottom. The
coordinate origin of the text depends on the font origin (see SetFontOrigin()). If the font origin is set
to orDownLeft the first character is placed on the font's baseline. This can be somewhat confusing
because the remaining text is of course placed below the first character. It is usually best to set the
font origin to orTopLeft, also if bottom up coordinates are used.
Because the text width is simply the font size, GetTextWidth() returns the text height in vertical
writing mode.
Encodings Identity-H and Identity-V
Iit is also possible to load TrueType and OpenType fonts with the special encodings Identity-H or
Identity-V with this function. These are encodings and no predefined external CMaps. That means
the CID-keyed font architecture is not used.
A font that was loaded with these encodings can be used as if it were loaded with SetFont() with the
code page cpUnicode. The only difference is that the font can be left unembedded. However, the
PDF file stores glyph indexes instead of CIDs and glyph indexes are private for every font. That
means if the original font is not available on the system then it is not possible to display the text!
It is not recommended to use these encodings with non-embedded fonts, although it works. If you
want to use fonts with these encodings then make sure that you use only standard fonts which are
normally available on the users system. The encodings Idenitity-H and Identity-V require Acrobat 6
or higher. Due to a change in the font search algorithm in Acrobat 10 it is no longer possible to
display such files with Acrobat 4/5.
Known issues:
• At time of publication CID fonts cannot be used with form fields.
• Vertical writing mode does not work with WriteFText().
Remarks:
All functions which output text report a warning if one or more characters cannot be found. Call
GetMissingGlyphs() to determine which characters could not be found.
Return values:
If the function succeeds the return value is the font handle, a value greater or equal zero. If the
function fails, the return value is a negative error code.
Previous topic: Word Spacing
Next topic: SetCMapDir