On Sun, Jan 23, 2022 at 2:04 PM zyx <z...@gmx.us> wrote:

> On 21.2.2019 v 20:18 Michal Sudolsky wrote:
> > I sent more which are still pending. At least let me know if some are
> > not acceptable so I can remove it from pending things ;)
>
>         Hi,
> I just realized that the change in the [r1967] breaks font subsetting
> with replacement to Base14 fonts in litePDF using PoDoFo 0.9.7.


Is it working with the latest revision?


> Writing "ěščř" only the "š" survives. There's used
> PdfString::setFromWchar_t()
> followed by m_pFont->WriteStringToStream(...) and the
> PdfEncodingDifference::ContainsUnicodeValue() fails to find some
> letters. The base encoding is WinAnsi.
>
>
Can you elaborate what exactly you are doing? If you are calling
ContainsUnicodeValue directly then you need to provide a letter in big
endian as function signature indicates. setFromWchar_t is swapping bytes so
internally they should be big endian inside resulting PdfString and
WriteStringToStream also accepts big endian data from PdfString (and I have
well tested this part with the latest revision).

This is only a little heads-up. I do not know how to correctly address
> this yet (it feels natural to store data in the PdfString in the machine
> byte order, thus the string can be used without additional
> re-byte-swapping needed). Suggestions welcome.
>

If I am not wrong, PdfString is internally always stored as a big endian.
There is no flag that would indicate whether it is big or machine byte
order so you cannot expect that it will work if you store it in PdfString
in machine byte order.

        Bye,
>         zyx
>
> [r1967] https://sourceforge.net/p/podofo/code/1967/
>
>
> _______________________________________________
> Podofo-users mailing list
> Podofo-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/podofo-users
>
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to