[HarfBuzz] A question about "simple" substitution / fallback
Ariel Malka
ariel at chronotext.org
Tue Dec 17 08:28:41 PST 2013
I have implemented a simple solution for substitution / fallback:
http://goo.gl/rw2u0J
As you can see in the screenshot, it looks like it works, but I would like
to test things further:
Does someone have suggestions of combinations to check?
I also invite you to check the code, hopefully spotting some potential
issues:
http://goo.gl/VXHXMS
Note that my solution is before "itemization" (script and BIDI) and
rendering optimization...
One assumption I'm making: a cluster is always containing glyphs from the
same font.
i.e. When doing multiple shaping-passes, it is not likely that a cluster
will contain, say, a letter from font A, and some diacritic from font B.
Finally, I'm wondering what's the purpose of the "shapers" construct, as
used here: http://goo.gl/jWPzUl
I'm not using it so far, as it does not seem to affect shaping.
Thanks!
Ariel
On Sun, Dec 15, 2013 at 7:56 PM, Ariel Malka <ariel at chronotext.org> wrote:
> Update:
>
> Thanks to Khaled Hosny in a previous thread for the link to Mapnik, which
> is indeed a great resource for learning.
>
> I stumbled upon the following, which seems to address my question:
>
> https://github.com/mapnik/mapnik/blob/master/include/mapnik/text/harfbuzz_shaper.hpp
>
> It's now time to digest all the new info ;)
> Ariel
>
>
> On Sun, Dec 15, 2013 at 7:29 PM, Ariel Malka <ariel at chronotext.org> wrote:
>
>> As an illustration, let's say I'd like to render Biblical Hebrew, solely
>> using Harfbuzz.
>>
>> BIDI should not be required, since we only have Hebrew characters with
>> diacritics, and basic punctuation marks (mainly semicolons...), all in RTL.
>>
>> It would be straightforward using a font like Arial.ttf.
>>
>> But I'm trying to simulate the Android environment. So for instance, I
>> would have to use DroidSansHebrew-Regular.ttf for the characters and
>> diacritics and DroidSans.ttf for punctuation.
>>
>> Note that I don't plan to use advanced solutions like fontconfig at this
>> stage.
>>
>> Do I need to itemize the text into runs with the same font, prior to
>> shaping or is there a trick (e.g. at the Freetype or OpenType levels) for
>> handling, say, a "virtual font made of two fonts"?
>>
>> Thanks!
>>
>> Ariel
>> http://chronotext.org
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20131217/83729744/attachment.html>
More information about the HarfBuzz
mailing list