psb1558 / Junicode-font

A new version of Junicode font
SIL Open Font License 1.1
397 stars 17 forks source link

ss01 implementation is not consistent across all weights #241

Closed tarrinw closed 1 year ago

tarrinw commented 1 year ago

The use of ss01 seems to have been reversed (hooray!) in Junicode 2 so that when selected, Old English forms are used for þ and ð - but this is not consistent in all weights.

In implementing the new font in woff2 format on onp.ku.dk I have noticed that the standard woff2 files have the Junicode 2 encoding, as do the Light forms (woff2 files generated myself in FontForge), but Bold and Semibold have the old Junicode 1 values (again generated myself in FontForge) - headings therefore have a different form for these characters from the main text.

I can get around this by css, but presumably the intention is to use stylistic sets consistently across all weights.

tarrinw commented 1 year ago

Looking further into it, this could be a problem with CSS somehow, but I'm not sure so I'm leaving this issue open

psb1558 commented 1 year ago

I'm not sure it's possible to have a different ss01 in different weights, since they are all generated from the same file. Can you share your CSS?

tarrinw commented 1 year ago

This seems to be a problem with Chrome (also Safari) rather than with the font. If anyone has a solution I'd be grateful!

psb1558 commented 1 year ago

I might be able to help if you could either share your CSS or link to the page you're using to test.

tarrinw commented 1 year ago

I have tested this on another device and cannot replicate the issue. I think Chrome and Safari (but not Firefox) on my usual laptop are substituting an earlier locally installed version of Junicode 1 in certain parts of the HTML page. They shouldn't do that and the fonts are named differently here anyway, but this is my best explanation of the issue.

I'm therefore closing this issue.

/*** Junicode2 (Sept 2023) ***/
@font-face { font-family: Junicode2; src: url(/onp/lib/fonts/Junicode2.004-Light.woff2); font-display: swap; }
@font-face { font-family: Junicode2; src: url(/onp/lib/fonts/Junicode2.004-LightItalic.woff2); font-style: italic; font-display: swap; }
@font-face { font-family: Junicode2; src: url(/onp/lib/fonts/Junicode2.004-Smbold.woff2); font-weight: bold; font-display: swap; }
@font-face { font-family: Junicode2; src: url(/onp/lib/fonts/Junicode2.004-SmboldItalic.woff2); font-weight: bold; font-style: italic; font-display: swap; }
* {
  font-family: "Junicode2", serif !important;
  /* junicode Old Norse thorn and eth (ss01 flipped in Junicode2), ligatures, etc. */
  font-feature-settings: "ss10", "ss15", "kern";
  line-height: 1.25; /*for use with Junicode*/
}

Firefox/Gecko (works)

Screenshot 2023-09-28 at 09 26 22

Chrome/Blink and Safari/WebKit (inconsistent - see heading and drop-down, but it is unclear why the stylistic set is chosen).

Screenshot 2023-09-28 at 09 25 12
psb1558 commented 1 year ago

To me it looks as if the language for the heading and the dropdown menu is defaulting to English. Can you explicitly change the language to Danish for those elements?

psb1558 commented 1 year ago

This could happen if the default language for your laptop is English, but Danish for the other machines you've tested on.

You generally don't need ss01: just set the language correctly, and you'll get the correct shapes of thorn and eth.