[Lazarus] PDF generator: please test
Dmitry Boyarintsev
skalogryz.lists at gmail.com
Sun Apr 10 10:16:32 CEST 2016
On Sun, Apr 10, 2016 at 3:15 AM, Michael Van Canneyt <michael at freepascal.org
> wrote:
It feels like, these two paragraphs:
>
> The user of the API should not have to care what font is used.
> the API should do whatever is necessary to emit correct PDF for the
> current font.
>
> If internally there are different calls needed for different fonts, then
> that is OK, but they should not be exposed to the user, at the best they
> should be made protected.
> (if need be, we can expose them later)
>
contradict to:
> If the currently used font does not contain the necessary glyphs to
> represent
> the text, we will not check it, that is the responsability of the user.
The APIs should either do the font-substitution (with whatever level of
control from the user side). (something what graphic APIs are doing for
text rendering)
or should not do them at all (leaving full font-substitution to the user)
Then there should be some cross-platform APIs provided (not necessary part
of PDF package) that would perform font substitution by the (unicode) text
and the desired font (font-size).
Eventually, someone would provide WriteUTF8TextSmart() function, that
would split the text into parts (by fonts used) and would populate the PDF
accordingly, if PDF library doesn't the font-substitution itself.
For example, rendering a text with mix of latin letters and hieroglyphs,
using Times New Roman font. Typically for hieroglyphs one of system default
CJK fonts are used.
thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160410/fe01b30e/attachment-0003.html>
More information about the Lazarus
mailing list