fvim icon indicating copy to clipboard operation
fvim copied to clipboard

Doesn't recognize Iosevka Extended

Open habamax opened this issue 5 years ago • 14 comments

Win10

Iosevka Habamax is a custom iosevka build which by default includes extended variant of the font.

It works everywhere but fvim.

fvim-iosevka-extended

habamax avatar Feb 04 '20 17:02 habamax

Harfbuzz font name problem. Can you upload the custom build? I'll take a look to see what Harfbuzz thinks the name really is.

yatli avatar Feb 05 '20 13:02 yatli

Can you upload the custom build? I'll take a look to see what Harfbuzz thinks the name really is.

It is not about custom build. I can see the same issue with latest iosevka.

set guifont=Iosevka\ Extended:h16

https://github.com/be5invis/Iosevka/releases/tag/v3.0.0-beta.2

habamax avatar Feb 05 '20 13:02 habamax

You mean, a single ttf file now represents two fonts?

yatli avatar Feb 05 '20 14:02 yatli

Let me grab 3.0 now..

yatli avatar Feb 05 '20 14:02 yatli

You mean, a single ttf file now represents two fonts?

Yes, extended version included since alpha2

habamax avatar Feb 05 '20 14:02 habamax

I think it's the same behavior as that set guifont=Iosevka\ Bold:h16 doesn't work either.. Wondering how to correctly interpret the name with Skia/Harfbuzz

yatli avatar Feb 05 '20 14:02 yatli

Are these variable fonts? I guess you have to enable the appropriate font feature to get the desired results.

Gillibald avatar Feb 08 '20 11:02 Gillibald

Are these variable fonts?

No.

habamax avatar Feb 08 '20 11:02 habamax

@Gillibald thanks! Could you share some more information on where to change this kind of configuration? I see there's weight config, slant config, but "Extended" is not any of these.

yatli avatar Feb 08 '20 11:02 yatli

Also, VF support would be awesome to have.

yatli avatar Feb 08 '20 11:02 yatli

I have to add https://github.com/harfbuzz/harfbuzz/blob/master/src/hb-ot-var.h to the binding first to support this. After this is added you can find the named instance that holds the extended font family.

For reference: https://docs.microsoft.com/en-us/typography/opentype/spec/fvar

Gillibald avatar Feb 08 '20 12:02 Gillibald

So if I understand correctly:

  • Use hb_ot_var_get_axis_infos to pull the name ids.
  • Use something like hb_ot_name_get_utf8 to retrieve the textual font face name
  • Then use the high level interface to get that font face directly?

yatli avatar Feb 08 '20 12:02 yatli

I think you have to use https://github.com/harfbuzz/harfbuzz/blob/master/src/hb-ot-var.h#L112 to get the named instance. Everything else should be the way to go.

Edit: The name id should give you the face you are looking for.

hb_ot_var_get_axis_infos gives you a list of variable axis that are supported.

Gillibald avatar Feb 08 '20 12:02 Gillibald

Got it! Didn't understand that variation axis and sub families are two different concepts. :)

Thanks!

yatli avatar Feb 08 '20 13:02 yatli