[HarfBuzz] Dealing with ligatures and text input
Ebrahim Byagowi
ebraminio at gmail.com
Wed Jan 21 07:56:12 PST 2015
I'd guess descriptions here
<https://codereview.chromium.org/130433006#msg8> would
make that clear for you. For disabling ligature, you should find which
OpenType tag your font use for that ligature and tell HarfBuzz to disable
that tag on shaping if it is enabled by default, for example opentype
specification
<http://www.microsoft.com/typography/OpenTypeDev/standard/intro.htm> suggests
'liga' for "fi" ligature but that may differs on the font you use.
On Wed, Jan 21, 2015 at 6:50 PM, Diederick Huijbers <diederickh at gmail.com>
wrote:
> Hi,
>
> I'm working on a C/C++/OpenGL text input field and wondering if someone
> can give
> me some advise on how to deal with ligatures and text input.
>
> Lets say I have a input field and I type "fi". Now, harfbuzz will replace
> these two
> characters by the "fi" ligature. To be honest, I've no idea if the
> ligature "fi" makes
> the text more readable, but I assume it does.
>
> But if I use ligatures (because of the reasons harfbuzz uses them), how
> would I
> deal with e.g. the placement of the caret in the text input field. I
> should allow the user
> to move the caret between the "f" and "i" for example. Though how would I
> know the
> correct (visual) x position ?
>
> And lets say I use the input field so a user can register him/herself and
> the value is
> stored in a database. Would I store the "fi" ligature or both characters
> separately?
>
> Currently I think disabling ligatures is my best option, but I'm not sure
> how I can disable
> this with harfbuzz.
>
> Thanks
> roxlu
>
>
> _______________________________________________
> HarfBuzz mailing list
> HarfBuzz at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/harfbuzz
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20150121/564e8747/attachment.html>
More information about the HarfBuzz
mailing list