freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ftdump can show the CID registry, ordering, and supplement?


From: Alexei Podtelezhnikov
Subject: Re: ftdump can show the CID registry, ordering, and supplement?
Date: Thu, 20 Apr 2023 16:08:21 -0400

Hi Suzuki,

Using these fonts
(https://resources.oreilly.com/examples/9781565922242/tree/master/adobe/samples)
I learned that FT_Load_Glyph interprets the glyph_index as CID. Could
you scan the CID range directly using FT_LOAD_NO_SCALE? Or, is this
still too slow?

Thanks
Alexei

On Thu, Apr 20, 2023 at 12:47 AM suzuki toshiya
<mpsuzuki@hiroshima-u.ac.jp> wrote:
>
> Dear Alexei, Werner,
>
> Here is reworked version, which assumes
> "no zig-zag mapping is found by FT_Get_CID_From_Glyph_Index()".
>
> https://gitlab.freedesktop.org/mpsuzuki/ft2demos-mps-wip/-/commit/453de7aa3f9ccd54824ab3468c5a3b91507a86a9
>
> ( 
> https://gitlab.freedesktop.org/mpsuzuki/ft2demos-mps-wip/-/commits/mr-ftdump-print-cid-ros-assume-order
>  )
>
>
> Regards,
> mpsuzuki
>
>
> On 2023/04/20 12:46, suzuki toshiya wrote:
> > Dear Alexei,
> >
> > Umm, TN#5092 is a document in the world of pure CID-keyed font,
> > so it does not care about the mapping between the CID and
> > TrueType (or CFF) GID, so I'm unsure if it is a solid footstone
> > to exclude the unordered CIDs.
> > For example, "GB1 represents the first version of the ordering
> > based on the Chinese GB 2312-80 character set" describes
> > "how CID numbers are assigned to the characters? It is based
> > on the order of GB 2312-80", it might be independent with
> > the internal of CID-keyed font.
> >
> > But anyway, yet I have no concrete example to justify my
> > concern about "zig-zag" mapping between GID and CID.
> >
> > OK, so I propose - I'll rework my patch based on the assumption
> > "the larger GID is mapped to the larger CID, no zig-zag
> > mapping from GID to CID", to avoid 64kByte array allocation.
> > Then, when ftdump receives a font breaking this assumption,
> > ftdump aborts with an error, and indicates an email address
> > (or website?) to report the issue. Is it acceptable workaround?
> >
> > Regards,
> > mpsuzuki
> >
> > On 2023/04/20 11:08, Alexei Podtelezhnikov wrote:
> >> Dear Suzuki,
> >>
> >>> Indeed. If GID-CIDs are already sorted, it's easy to dump the
> >>> available CIDs in a compressed syntax. Although I have no sample
> >>> font including unsorted CIDs, I'm unsure whether it is required
> >>> in some specifications.
> >>
> >> The order of CIDs is in "registry, *ordering*, and supplement". Also
> >> it is mentioned in the specs (5092): "A character collection consists
> >> of an ordered set of all characters". I think we can rely on that.
> >>
> >> If there is a CID to glyph index mapping in each file, why doesn't
> >> FreeTyope generate a cmap?
> >>
> >> Thanks,
> >> Alexei
> >



-- 
Alexei A. Podtelezhnikov, PhD



reply via email to

[Prev in Thread] Current Thread [Next in Thread]