<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Apr 10, 2016 at 3:15 AM, Michael Van Canneyt <span dir="ltr"><<a href="mailto:michael@freepascal.org" target="_blank">michael@freepascal.org</a>></span> wrote:</div><div class="gmail_quote"><br></div><div class="gmail_quote">It feels like, these two paragraphs:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
The user of the API should not have to care what font is used.<br>
the API should do whatever is necessary to emit correct PDF for the current font.<br>
<br>
If internally there are different calls needed for different fonts, then<br>
that is OK, but they should not be exposed to the user, at the best they should be made protected.<br>
(if need be, we can expose them later)<br></blockquote><div> </div><div>contradict to:<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If the currently used font does not contain the necessary glyphs to represent<br>
the text, we will not check it, that is the responsability of the user.</blockquote><div><br></div><div>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)</div><div>or should not do them at all (leaving full font-substitution to the user)</div><div><br></div><div>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).</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>thanks,</div><div>Dmitry</div></div></div></div>