jpt / barlow

Barlow: a straight-sided sans-serif superfamily
https://tribby.com/fonts/barlow
SIL Open Font License 1.1
713 stars 38 forks source link

ldot and Ldot characters MISSING #64

Open arzelcm opened 4 years ago

arzelcm commented 4 years ago

I just wanted to implement the font but I found a character is missing. Ldot and ldot ('L·' and 'l·') are used in catalan (ca). They're so simple: just an L with a middle-dot. I tried to implement them separately but it's quite difficult, some navigators get user's nav language and it's impossible to change it, they parse them as ldot unicode. Instead of l·l what I get is a weird character: weird character Which sould be: l·l This is a common character in catalan.

By the way, thanks for your work!

arzelcm commented 4 years ago

I solved it forcing the browser to change the language using xml:lang="en". It's not a good practice so I hope a fix will be done on this.

jorditarrida commented 4 years ago

Hi @arzelcm, This is related to issue #46. Just wanted to clarify that although the Ldot and ldot characters do exist, the proper way to write l·l character is not with either of those characters but a three character combination (two l and one ·, the middot character [U+00B7], called "punt volat" in Catalan). Using the Ldot [U+013F] and ldot [U+0140] characters (called "elapunt" characters in Catalan) to write the l·l character is highly adviced against. So just wanted to make sure any efforts to fix this are centered around fixing the three character combination l·l in Catalan contexts (only Catalan is affected by this issue, as seen on #46!).

arzelcm commented 4 years ago

Hi @jorditarrida, First of all, thanks for the references. I didn't know ldot is kind of deprecated or not recomended by unicode. Most browsers, including Chrome, interpretate as it when the combination of two l and · is written. So I'm a bit confused with which would be the best way to fix this: wether forcing the browser language to interpretate it correctly (the way I currently fix it) or replace every ldot or Ldot with the combination of the raw characters, which means (in my opinion) implementing a not very clean fix. Anyway, thanks a lot!

jmontane commented 3 years ago

Hi, ldot characters (both lowercase and uppercase) are legacy characters used for Catalan language only. These characters are valid Unicode codepoints, but they aren't used for Catalan nowadays, because L+00B7+L (3 characters) encoding for geminated el is preferred.

So, there are two different problems here.

First one: the glyph. How is ldot endered? As you can see in other fonts, the dot of ldot is placed at the middle of character height, not above. Current ldot rendering with Barlow font is clearly wrong.

Second one: Catalan case. Barlow font use ldot for locl ligature for Catalan text only (issue #46, please reopen it). So, you have a text encoded with the good preferred encoding of 3 chars: l+00B7+l, but it's rendered as ldot+l (!!?), and the first described problem (wrong/missing ldot glyph) arises.

So, I request:

  1. Please, define good glyphs for ldot/Ldot. Fixing first described problem.
  2. Meantime ldot glyph is not fixed, please remove/disable locl ligature for L·L for Catalan text. Fixing described problem 2.

More info about Ldot and Catalan case here: https://glyphsapp.com/tutorials/localize-your-font-catalan-punt-volat

jpt commented 2 years ago

hello everyone, sorry for the premature closure of issue #46, clearly there has been an issue with the anchor auto-positioning itself. some people reminded me of this on twitter and I looked into it. beyond the dot being in the wrong place, Ldot and ldot probably shouldn't be in the font at all, in favor of a locl opentype feature, and a differently-spaced periodcentered.loclCAT — or at least that is what I have done more recently in other fonts.

lookup locl_latn_1 {
    script latn;
    language CAT;
    sub l periodcentered' l by periodcentered.loclCAT;
    sub L periodcentered' L by periodcentered.loclCAT.case;
        sub L.sc periodcentered' L.sc by periodcentered.loclCAT.sc;
} locl_latn_1;

is probably what we want. I quickly built a version of this without the Ldot and ldot glyphs (and without smallcaps) here to test- BarlowCAT-2.zip. one question I have before formalizing this fix: if I solve this with opentype features, will it create more problems to also include the Ldot and ldot glyphs, or will it solve an actual problem to also include them?

thanks to all for reviving this issue.

jmontane commented 2 years ago

Hi,

I tested BarlowCAT-2.zip, and it renders fine l·l (U+00B7). Great!

About Ldot and ldot glyphs. Many fonts add them. They are legacy, few used characters, but still valid Unicode codes. They don't hurt.

Catalan L·L (encoded with 3 chars, 00B7) is the most common encoding by far, but there are very few users with custom keyboards who type Ldot/ldot followd by another L/l (L·L encoded with 2 chars). So you can add Ldot and ldot glyphs, but they must show dot at the middle of character height.

Thanks!

jpt commented 2 years ago

Thanks for clarifying @jmontane ! As long the Ldot/ldot glyphs don't hurt, I'll include them along with the spacing-based solution for U+00B7

I'll update here when I've pushed new sources

jpt commented 2 years ago

Just updating this to say I am creating a list of TODOs for the repo and will be stack ranking them. Probably will get this first since it's already in, just not published yet. Will update here when there's a new branch going.

jpt commented 2 years ago

the source file is now updated here https://github.com/jpt/barlow/tree/1.5

will update when there are new font binaries

jpt commented 2 years ago

new binary files can be tested here https://github.com/jpt/barlow/tree/1.5/fonts

I will do some more testing of my own before pulling it in

thanks again for opening the issue