silnrsi / font-charis

Fonts for languages and writing systems that use the Latin and Cyrillic scripts
https://software.sil.org/charis/
SIL Open Font License 1.1
76 stars 7 forks source link

Font features do not work in LibreOffice #12

Closed Lomacar closed 1 year ago

Lomacar commented 1 year ago

There is something wrong with the Charis and Doulos SIL fonts when trying to use the Graphite or OpenType (whichever they are) features. I am specifically trying to get a capital eng as a normal capital N with a tail, using cv43=2 or Engs=2, but I have also tried smcp for small caps. The small caps works, for example, with Linux Libertine. But nothing works for Charis or Doulos.

Furthermore, if you try to select font features in LO from the fonts tab, it doesn't correctly set the flags or whatever you call them. If you try to set the "Uppercase Eng alternates" to "Capital N with tail", for example, it merely appends :=2 to the end of the font name. If you try to set multiple features it devolves to just appending :&&. So clearly something is broken.

MS Word is no better in terms of offering support for these features, but strangely Doulos defaults to the nice capital N eng with tail. That's great and interesting, but I need it to work in LibreOffice. And Charis is still the ugly giant lowercase eng in Word.

I tested on LO 7.0 and 7.4 with Charis SIL 6.101 and some older version of Doulos SIL.

jvgaultney commented 1 year ago

Hi -

Sorry that this is causing you frustration. Setting features in LibreOffice does work, however two things may have made it troublesome for you. Here's a screenshot from LO and Charis SIL 6.101:

image

We removed Graphite from our Latin script fonts (including Charis SIL and Doulos SIL) in version 6.000. All features are now activated through OpenType. If you try to compare Doulos 5 with Charis 6 you'll get frustrated as the features work completely differently. We recommend you only use v6+ fonts.

Although the LO UI has better-than-average support for OpenType, including character variant features, there is no way to control multivalued features like cv43 in the UI. You need to specify the features settings in the font name, as in Charis SIL:cv43=2&smcp=1. Our Font Help Guide on Using Font Features gives this exact example.

I hope this solves the problem for you. If not, please respond and give us a bit more info, such as OS and version.

Lomacar commented 1 year ago

Strange. It works for you to set the font as Charis SIL:cv43=2? For me it does nothing. I wish it did!

Also, you say there is no way in LO to control multivalued features in the UI. But I just tested with Linux Libertine. It has a feature call frac which can be set to 'none', 'diagonal', or 'nut'. It works perfectly fine through the UI.

Additionally, the problem with Charis and Doulos is not just with multivalued features. NO features are properly set from the font features window in LO for Charis, Doulos (4.1), or Gentium Basic (1.1), but it does work for all other fonts I have tested. It does work for Andika v1.004 and Gentium Plus v5. I am even able to set the desired eng with Andika and Gentium Plus. What is the difference?

I guess the difference is OpenType vs Graphite and OpenType is not working for me for some reason?

kenmcd commented 1 year ago

First, do not use the LibreOffice font Features interface. It is totally wacko, and only works for some features basic defaults. It shows things to enable which are enabled by default. So enabling them does nothing (and just adds confusion). It shows multiple things which are mutually exclusive. So you can enable features which override or cancel-out other features. And as mentioned above - it does nothing but select the default value for any feature with multiple values which you can select. You have to know the options in the font and manually select them using the codes. It is a mess which only confuses users. Do not use it.

Learn how to manually enter the codes. Read the article linked above. And this is a good beginner guide: http://scholarsfonts.net/Using_OT_in_LibreOffice_1-2.pdf

What version of Charis SIL do you have installed? Make sure you have only v6.101 installed, and you have not installed it as a duplicate (check your Fonts folders - both Windows Fonts and your User Fonts folder for duplicate files).

Forget about Graphite, it has nothing to do with any of this.

Furthermore, if you try to select font features in LO from the fonts tab, it doesn't correctly set the flags or whatever you call them. If you try to set the "Uppercase Eng alternates" to "Capital N with tail", for example, it merely appends :=2 to the end of the font name. If you try to set multiple features it devolves to just appending :&&. So clearly something is broken.

Those are not the descriptions in the font for the OpenType Character Variant. My guess is that is an old Graphite description. Make sure you have only the current fonts.

The font code above (Charis SIL:cv43=2) is working fine in LibreOffice v7.4.2.3 x64. The font is not the issue.

jvgaultney commented 1 year ago

One clarification: the LO UI does support some multivalued features (like frac), but does not support multivalued character variant features (cvNN). You need to manually type the definition into the font name selection box

The main problem here is that you are using old versions of some fonts and expecting the latest versions to work the same way. You are very welcome to keep using older versions if you wish. They still work in most cases. It will be less confusing if you stick to the same version (v5 or v6.1) for the various fonts.

If you want to use current and upcoming versions, please clear out all versions you have of Charis SIL, Doulos SIL, Gentium Plus, and Andika and replace them with v6.101 versions. Those fonts also fully replace any 'Basic' fonts like Gentium Basic and Andika New Basic.

If you have documents created with older versions where you have set font features, you'll then need to go back and reapply those features. For example, if you have been using Doulos SIL 4.1, used the Eng feature, then switch to Doulos SIL 6.101, that feature will be missing as it was an old Graphite one. You'll need to apply the new cv43 one. I know this is a pain, but was a one time change necessary in order to make our fonts more in line with current industry practice and technical requirements.

.