justvanrossum / fontgoggles

FontGoggles: Visual OTL Preview and QA
Apache License 2.0
398 stars 42 forks source link

Align ranges of text #124

Open florianpircher opened 4 years ago

florianpircher commented 4 years ago

Currently FontGoggles offers four alignment options: Automatic, Left, Right, and Center. I think it would be useful to be able to center any range of text:

I have been working on a similar application to FontGoggles, albeit much less feature rich, https://linear-textur.com, where I implemented centering a range by putting it between less-than & greater-than signs:

This works with all three scenarios as mentioned above (entire string, range of chars, empty range (<>)).

Since discovering FontGoggles I no longer want to use/maintain Linear Textur, but I still use it occasionally for the custom alignment functionality. The following example shows a comparison of the letter ɱ in context of a word set in different fonts, with alignment on the left and without on the right:

Computing the offsets to achieve such an alignment is not difficult. I suspect the main difficulties in integrating this into FontGoggles will be support for bidirectional layout, what to do in vertical layout and how to surface this in the UI.

The < and > always felt like a hack, requiring \< to insert a real < and not working well in a BiDi context. Maybe a context menu on the Unicode list could work?

justvanrossum commented 4 years ago

Can you describe why you find this feature useful?

florianpircher commented 4 years ago

The IPA example in the above comment shows why I find myself reaching for this functionality. When designing a glyph, especially when I am not familiar with the character, I want to compare my design with others fonts to see if I’m completely out of line in terms of proportions, stroke-modulation, or other design features. Here are some more example that illustrate the utility:

While this would be mostly possible by entering just a single character as input, I like to test glyphs in context to make sure that a glyph fits nicely together with the rest of the font.