lute-v3 icon indicating copy to clipboard operation
lute-v3 copied to clipboard

Add customs fonts per language

Open M-Biggles opened this issue 1 year ago • 6 comments

A very useful feature would be to add a 'Font' field (new/edit language pages).

Many languages share the same script but can be quite distinct typographically.

M-Biggles avatar Feb 21 '24 16:02 M-Biggles

Hi @M-Biggles - can you give me a concrete example? I can't understand what this request is about. Is Font like "helvetica", or something totally different? Is this related to #220 , "writing systems"?

jzohrab avatar Feb 22 '24 05:02 jzohrab

In Custom Styles, we can set fonts like this:

span.textitem[data-lang-id="3"]{ font-family:"David CLM"; } span.textitem[data-lang-id="34"]{ font-family:"Akkadian"; } span.textitem[data-lang-id="57"]{ font-family:"Samyak Tamil"; } span.textitem[data-lang-id="58"]{ font-family:"Noto Sans"; } span.textitem[data-lang-id="62"]{ font-family:"Tiro Devanagari Marathi"; }

It's possible now but difficult (especially for non-coders). With fonts part of language presets, we could offer better language support. This isn't a real issue for something like English or Spanish, but for many languages, the difference in font is a big deal.

M-Biggles avatar Feb 22 '24 07:02 M-Biggles

Even for the same language, different regions have different glyph standards. The “language” would be actually “language-script-region”.

GrimPixel avatar Feb 23 '24 23:02 GrimPixel

Even for the same language, different regions have different glyph standards. The “language” would be actually “language-script-region”.

Yeah, absolutely. That's why I decided to make this issue; it has a big impact because it really helps to match the look and feel of the language to the reality.

M-Biggles avatar Feb 24 '24 13:02 M-Biggles

The same text can be assigned more than one “language-script-region” value, like deu-Latn-DE and deu-Latf-DE, where the latter one is in Fraktur type.

GrimPixel avatar Feb 24 '24 22:02 GrimPixel

The same text can be assigned more than one “language-script-region” value, like deu-Latn-DE and deu-Latf-DE, where the latter one is in Fraktur type.

Yeah, for sure. I've had the same idea in mind. Per-text settings would be nice, but just getting per-language settings is our first step. Definitely worth returning to it when the time is right.

M-Biggles avatar Feb 25 '24 09:02 M-Biggles