On Sun, 10 Apr 2016, Graeme Geldenhuys wrote:

On 2016-04-09 09:09, Ondrej Pokorny wrote:
   P.WriteText(25, 0, 'Sample Text'); // DOESN'T WORK !!!

Indeed. As I mentioned, the Write*Text() names are a bit inaccurate and
will be improved. At the moment WriteText() is meant for the Standard
PDF Fonts, and WriteUTF8Text() for any TTF fonts used.

Wow, let me interfere here before we go in a wrong direction:

The public API should not depend on the selected font.

WriteText() is meant for Ansi text - whatever the current font.
WriteUTF8Text() is meant for UTF8 encoded unicode text, whatever the current 
font.

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)

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.

Michael.


--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to