[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] Loading FT_Face without having access to the font as whole
From: |
Werner LEMBERG |
Subject: |
Re: [ft] Loading FT_Face without having access to the font as whole |
Date: |
Sat, 27 Jul 2013 10:41:40 +0200 (CEST) |
>> Looking at [1]: Why not referring to `face->face_index'? This
>> gives the current index of a multi-font file.
>
> What that function does is take a CTFont and return its file name
> and face index to be used by FreeType. [...]
OK, I've misunderstood.
> I'm not good at writing pseudo code (or any code, for that
> matterĀ :), so I hope this explanation is clear enough.
Well, I'm a novice with HarfBuzz, and its lack of documentation makes
it rather difficult to understand quickly...
> HarfBuzz has hb_face_create_for_tables() that takes a callback
> function and a pointer, the callback functions is called with the
> table tag and the pointer and returns a buffer, whenever HarfBuzz
> wants to access a font table. For my case the pointer would be a
> CTFont and the callback function would call CTFontCopyTable() on it.
You can't compare an `hb_face' structure with `FT_Face'; the
functionality is completely different. If I understand you correctly,
you want to create an FT_Face from various single tables, right? Then
the approach from LibreOffice seems the correct one to me
(https://gerrit.libreoffice.org/gitweb?p=core.git;a=blob;f=vcl/coretext/salgdi2.cxx#l532).
Toshiya-san, do you think it's worth to add, say, a function
`FT_New_Face_From_CTFont' to the Mac interface of FreeType?
Werner