Patch with corrected indentation attached.

On Wed, Dec 5, 2018 at 8:31 PM Michal Sudolsky <sudols...@gmail.com> wrote:

> Proposed patch attached.
>
> It follows something similar what is doing ConvertToEncoding in its core.
> Now widths of all font supported unicode chars are correctly obtained. I
> also deduplicated PdfFontMetricsObject::CharWidth as it does same thing as
> UnicodeCharWidth and left GetGlyphWidth unimplemented as this would require
> converting glyph to cid for cid encoding.
>
>
> On Wed, Nov 28, 2018 at 11:39 PM Michal Sudolsky <sudols...@gmail.com>
> wrote:
>
>> PdfFontMetricsObject::UnicodeCharWidth returns width for CID instead of
>> unicode char (like does PdfFontMetricsFreetype and PdfFontMetricsBase14).
>> Maybe it can be fixed by converting unicode char into CID using
>> m_pEncoding->GetCIDValue (after few modifications). And implement also
>> PdfFontMetricsObject::GetGlyphId. Body of UnicodeCharWidth could be
>> implementation of PdfFontMetricsObject::GetGlyphWidth. Actually W contains
>> CIDs and not glyphs so GetCIDValue may work for UnicodeCharWidth but I am
>> not sure about GetGlyphId and GetGlyphWidth if encoding or CIDToGIDMap is
>> not identity.
>>
>>

Attachment: patch_string_width_bug.diff
Description: Binary data

_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to