liamg / darktile

:waning_crescent_moon: Darktile is a GPU rendered terminal emulator designed for tiling window managers.
MIT License
3.03k stars 113 forks source link

Only very few fonts found #302

Open pinpox opened 3 years ago

pinpox commented 3 years ago

darktile list-fonts only reports a very small amount of fonts even though a lot more are available on my system and only the fonts listed by list-fonts can be used in the configuration.

✦ ×  darktile list-fonts
la-brands-400
la-regular-400
la-solid-900
Comic Sans MS
Monoid
Monoisome
Comic Sans MS
devicon

Comparing the output to fc-list there is a huge difference

✦ ×  fc-list | wc -l
920

Tyring to use any family listed by fc-list results in

Error: could not find font with family 'Recursive Mono Linear Static'

Even though that font exists:

✦ ×  fc-match 'Recursive Mono Linear Static'
RecursiveMonoLnrSt-Regular.otf: "Recursive Mono Linear Static" "Regular"
liamg commented 3 years ago

Hey @pinpox what is the full path to the font on your system? I'm wondering if I'm not checking all possible locations. It currently looks in the following: https://github.com/liamg/fontinfo/blob/master/match.go#L22-L29

liamg commented 3 years ago

Also if you could upload the otf file I can do some testing :+1:

liamg commented 3 years ago

@pinpox This may be resolved in #305 - it was likely caused by https://github.com/liamg/fontinfo/issues/1

If you could retest with the latest that'd be great :)

pinpox commented 3 years ago

@liamg I updated to 0.0.9, but this was actually a regression, now no fonts are found at all when using darktile list-fonts

liamg commented 3 years ago

Sorry about that, hoping v0.0.10 will do it...

pinpox commented 3 years ago

Hey @liamg sorry, but still not working with v0.0.10. I'm back to a very limited number of fonts:

» darktile list-fonts
devicon
la-brands-400
Comic Sans MS
Monoisome
Comic Sans MS
la-solid-900
Comic Sans MS
Monoid
la-regular-400
liamg commented 3 years ago

Hmm, weird. Where are your fonts that it's not finding? Maybe I need to search some more directories. Could you also upload a font file that it's not discovering so I can try it?

pinpox commented 3 years ago

Hope this helps, this is where the font file is found by fc-match. You can download the font file here

×  fc-match Recursive -v
Pattern has 42 elts (size 48)
        family: "Recursive"(s) "Recursive Sans Linear Light"(s)
        familylang: "en"(s) "en"(s)
        style: "Mono Linear"(s)
        stylelang: "en"(s)
        fullname: "Recursive Mono Linear"(s)
        fullnamelang: "en"(s)
        slant: 0(i)(s)
        weight: 80(f)(s)
        width: 100(f)(s)
        size: 12(f)(s)
        pixelsize: 12,5(f)(s)
        spacing: 90(i)(w)
        foundry: "ARRW"(w)
        antialias: True(w)
        hintstyle: 1(i)(w) 1(i)(w)
        hinting: True(w)
        verticallayout: False(s)
        autohint: False(w)
        globaladvance: True(s)
        file: "/nix/store/34b40pygs1gwij66hq9zjwqfpk4rk7fs-home-manager-path/share/fonts/truetype/Recursive_VF_1.078.ttf"(w)
        index: 327680(i)(w)
        outline: True(w)
        scalable: True(w)
        dpi: 75(f)(s)
        rgba: 1(i)(w)
        scale: 1(f)(s)
        charset:
        0000: 00000000 ffffffff ffffffff 7fffffff 00000000 ffffffff ffffffff ffffffff
        0001: ffffffff ffffffff ffffffff 7fffffff 20048000 00018003 00001ff0 fc0e0cc0
        0002: 0fffffff 008f3c00 02000000 00040000 00000000 de000000 3f001fc0 00000000
        0003: 08269fdf 002241f8 00000000 00000000 00000000 00000000 00000001 00000000
        000e: 00000000 80000000 00000000 00000000 00000000 00000000 00000000 00000000
        001e: 30f0f300 0cc0cc33 cc0ff3fc 0f00f3ff 408cc03f ffffffff ffffffff 03ffffff
        0020: 773d0f80 460d0047 00040010 03f10000 000003ff b7363f42 00000000 00000000
        0021: 00480000 00004044 78180000 00000000 03ff0000 00000000 00000000 00000000
        0022: 46268064 00000800 00000100 00000033 00000000 00000000 00000000 00000000
        0025: 00000000 00000000 00000000 00000000 00000000 30cc0003 000004c3 00000000
        0026: 00030000 00000000 00000000 00000022 00000000 00000000 00000000 00000000
        0027: 00080000 00000000 00000000 00000000 00000000 00000000 00000000 00000300
        00e1: 00000000 000c0000 00000000 00000000 00000000 00000000 00000000 00000000
        00f8: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 80000000
        00fb: 0000000a 00000000 00000000 00000000 00000000 00000000 00000000 00000000
(w)
        lang: aa|af|ast|ay|az-az|bi|bin|br|bs|ca|ch|co|cs|cy|da|de|en|eo|es|et|eu|fi|fj|fo|fr|fur|fy|gd|gl|gn|gv|haw|ho|hr|hu|ia|ig|id|ie|io|is|it|ki|kl|kw|la|lb|lt|lv|mg|mh|mt|nb|nds|nl|nn|no|nr|nso|ny|oc|om|pl|pt|rm|ro|se|sk|sl|sm|sma|smj|smn|so|sq|ss|st|sv|sw|tk|tl|tn|to|tr|ts|uz|vi|vo|vot|wa|wen|wo|xh|yap|zu|an|crh|csb|fil|hsb|ht|jv|kj|ku-tr|kwm|lg|li|ms|na|ng|nv|pap-an|pap-aw|qu|quz|rn|rw|sc|sg|sn|su|ty|za(s)
        fontversion: 70648(i)(s)
        capability: "otlayout:DFLT otlayout:latn"(w)
        fontformat: "TrueType"(w)
        embeddedbitmap: False(w)
        decorative: False(s)
        lcdfilter: 1(i)(w)
        namelang: "en"(s)
        prgname: "fc-match"(s)
        postscriptname: "Recursive_1MONO_400wght"(w)
        color: False(w)
        symbol: False(s)
        variable: False(s)
        fonthashint: True(w)
        order: 0(i)(s)×  fc-match Recursive -v
Pattern has 42 elts (size 48)
        family: "Recursive"(s) "Recursive Sans Linear Light"(s)
        familylang: "en"(s) "en"(s)
        style: "Mono Linear"(s)
        stylelang: "en"(s)
        fullname: "Recursive Mono Linear"(s)
        fullnamelang: "en"(s)
        slant: 0(i)(s)
        weight: 80(f)(s)
        width: 100(f)(s)
        size: 12(f)(s)
        pixelsize: 12,5(f)(s)
        spacing: 90(i)(w)
        foundry: "ARRW"(w)
        antialias: True(w)
        hintstyle: 1(i)(w) 1(i)(w)
        hinting: True(w)
        verticallayout: False(s)
        autohint: False(w)
        globaladvance: True(s)
        file: "/nix/store/34b40pygs1gwij66hq9zjwqfpk4rk7fs-home-manager-path/share/fonts/truetype/Recursive_VF_1.078.ttf"(w)
        index: 327680(i)(w)
        outline: True(w)
        scalable: True(w)
        dpi: 75(f)(s)
        rgba: 1(i)(w)
        scale: 1(f)(s)
        charset:
        0000: 00000000 ffffffff ffffffff 7fffffff 00000000 ffffffff ffffffff ffffffff
        0001: ffffffff ffffffff ffffffff 7fffffff 20048000 00018003 00001ff0 fc0e0cc0
        0002: 0fffffff 008f3c00 02000000 00040000 00000000 de000000 3f001fc0 00000000
        0003: 08269fdf 002241f8 00000000 00000000 00000000 00000000 00000001 00000000
        000e: 00000000 80000000 00000000 00000000 00000000 00000000 00000000 00000000
        001e: 30f0f300 0cc0cc33 cc0ff3fc 0f00f3ff 408cc03f ffffffff ffffffff 03ffffff
        0020: 773d0f80 460d0047 00040010 03f10000 000003ff b7363f42 00000000 00000000
        0021: 00480000 00004044 78180000 00000000 03ff0000 00000000 00000000 00000000
        0022: 46268064 00000800 00000100 00000033 00000000 00000000 00000000 00000000
        0025: 00000000 00000000 00000000 00000000 00000000 30cc0003 000004c3 00000000
        0026: 00030000 00000000 00000000 00000022 00000000 00000000 00000000 00000000
        0027: 00080000 00000000 00000000 00000000 00000000 00000000 00000000 00000300
        00e1: 00000000 000c0000 00000000 00000000 00000000 00000000 00000000 00000000
        00f8: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 80000000
        00fb: 0000000a 00000000 00000000 00000000 00000000 00000000 00000000 00000000
(w)
        lang: aa|af|ast|ay|az-az|bi|bin|br|bs|ca|ch|co|cs|cy|da|de|en|eo|es|et|eu|fi|fj|fo|fr|fur|fy|gd|gl|gn|gv|haw|ho|hr|hu|ia|ig|id|ie|io|is|it|ki|kl|kw|la|lb|lt|lv|mg|mh|mt|nb|nds|nl|nn|no|nr|nso|ny|oc|om|pl|pt|rm|ro|se|sk|sl|sm|sma|smj|smn|so|sq|ss|st|sv|sw|tk|tl|tn|to|tr|ts|uz|vi|vo|vot|wa|wen|wo|xh|yap|zu|an|crh|csb|fil|hsb|ht|jv|kj|ku-tr|kwm|lg|li|ms|na|ng|nv|pap-an|pap-aw|qu|quz|rn|rw|sc|sg|sn|su|ty|za(s)
        fontversion: 70648(i)(s)
        capability: "otlayout:DFLT otlayout:latn"(w)
        fontformat: "TrueType"(w)
        embeddedbitmap: False(w)
        decorative: False(s)
        lcdfilter: 1(i)(w)
        namelang: "en"(s)
        prgname: "fc-match"(s)
        postscriptname: "Recursive_1MONO_400wght"(w)
        color: False(w)
        symbol: False(s)
        variable: False(s)
        fonthashint: True(w)
        order: 0(i)(s)
valters-tomsons commented 2 years ago

Same thing happens with Roboto fonts, available here.

I can confirm the file ~/.local/share/fonts/RobotoMono-VariableFont_wght.ttf exists, but is not found by list-fonts