You are not logged in.

#1 2020-02-21 00:21:06

accy
Member
Registered: 2019-12-23
Posts: 4

[SOLVED] Bitmap Fonts not Falling Back DWM/DMenu

I am trying to run dmenu and dwm with bitmap fonts. For example, let's use terminus.

I can run dmenu with terminus using this annoying xft font name

echo english | dmenu -fn terminus:pixelsize=12:style=medium:file=/usr/share/fonts/misc/ter-x12n.pcf.gz

and this works just fine. However, since terminus isn't a unicode font, when I send non-latin characters to dmenu, such as "english日本語", dmenu outputs "english[][][]" (where [] is the missing box-like character).

I want to set a fallback font for unicode when I can't use terminus. However, I noticed I don't have this problem in st, which I think doesn't use fontconfig. So I believe this to be a fontconfig issue rather than a dwm/dmenu issue, and I'll have to set the fallback in my fontconfig files. Does anyone know how to do this?


EDIT
Here I treid to use tewi font, which has the same problem.
the output `fc-match -s "lucy tewi"` is this:

tewi-medium-11.pcf.gz: "lucy tewi" "Regular"
tewi-bold-11.pcf.gz: "lucy tewi" "Bold"
DejaVuSans.ttf: "DejaVu Sans" "Book"
DejaVuSans-Bold.ttf: "DejaVu Sans" "Bold"
DejaVuSans-Oblique.ttf: "DejaVu Sans" "Oblique"
DejaVuSans-BoldOblique.ttf: "DejaVu Sans" "Bold Oblique"
NimbusSans-Regular.otf: "Nimbus Sans" "Regular"
ipag.ttf: "IPAGothic" "Regular"
NotoSans-Regular.ttf: "Noto Sans" "Regular"
DejaVuMathTeXGyre.ttf: "DejaVu Math TeX Gyre" "Regular"
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
DejaVuSerif.ttf: "DejaVu Serif" "Book"
NotoSansArmenian-Regular.ttf: "Noto Sans Armenian" "Regular"
SourceCodePro-Regular.otf: "Source Code Pro" "Regular"
NotoSansMono-Regular.ttf: "Noto Sans Mono" "Regular"
NotoSansHanifiRohingya-Regular.ttf: "Noto Sans Hanifi Rohingya" "Regular"
NotoSerifAhom-Regular.ttf: "Noto Serif Ahom" "Regular"
NotoSansCaucasianAlbanian-Regular.ttf: "Noto Sans Caucasian Albanian" "Regular"
NotoSansChakma-Regular.ttf: "Noto Sans Chakma" "Regular"
NotoSansGeorgian-Regular.ttf: "Noto Sans Georgian" "Regular"
NotoSansKhmer-Regular.ttf: "Noto Sans Khmer" "Regular"
NotoSansKhojki-Regular.ttf: "Noto Sans Khojki" "Regular"
NotoSansMath-Regular.ttf: "Noto Sans Math" "Regular"
NotoSansMyanmar-Regular.ttf: "Noto Sans Myanmar" "Regular"
NotoSansNewa-Regular.ttf: "Noto Sans Newa" "Regular"
NotoSansOldHungarian-Regular.ttf: "Noto Sans Old Hungarian" "Regular"
NotoSansOldItalic-Regular.ttf: "Noto Sans Old Italic" "Regular"
NotoSansSharada-Regular.ttf: "Noto Sans Sharada" "Regular"
NotoSansSiddham-Regular.ttf: "Noto Sans Siddham" "Regular"
NotoSansSymbols2-Regular.ttf: "Noto Sans Symbols2" "Regular"
NotoSansTifinagh-Regular.ttf: "Noto Sans Tifinagh" "Regular"
NotoSansTirhuta-Regular.ttf: "Noto Sans Tirhuta" "Regular"
NotoSerifKannada-Regular.ttf: "Noto Serif Kannada" "Regular"
NotoSerifSinhala-Regular.ttf: "Noto Serif Sinhala" "Regular"
NotoSerifTibetan-Regular.ttf: "Noto Serif Tibetan" "Regular"
SourceHanSansJP-Regular.otf: "Source Han Sans JP" "Regular"
NotoKufiArabic-Regular.ttf: "Noto Kufi Arabic" "Regular"
NotoMusic-Regular.ttf: "Noto Music" "Regular"
NotoNastaliqUrdu-Bold.ttf: "Noto Nastaliq Urdu" "Bold"
NotoSansAdlam-Regular.ttf: "Noto Sans Adlam" "Regular"
NotoSansAnatolianHieroglyphs-Regular.ttf: "Noto Sans Anatolian Hieroglyphs" "Regular"
NotoSansArabic-Regular.ttf: "Noto Sans Arabic" "Regular"
NotoSansAvestan-Regular.ttf: "Noto Sans Avestan" "Regular"
NotoSansBamum-Regular.ttf: "Noto Sans Bamum" "Regular"
NotoSansBassaVah-Regular.ttf: "Noto Sans Bassa Vah" "Regular"
NotoSansBatak-Regular.ttf: "Noto Sans Batak" "Regular"
NotoSansBengali-Regular.ttf: "Noto Sans Bengali" "Regular"
NotoSansBhaiksuki-Regular.ttf: "Noto Sans Bhaiksuki" "Regular"
NotoSansBrahmi-Regular.ttf: "Noto Sans Brahmi" "Regular"
NotoSansBuginese-Regular.ttf: "Noto Sans Buginese" "Regular"
NotoSansBuhid-Regular.ttf: "Noto Sans Buhid" "Regular"
NotoSansCanadianAboriginal-Regular.ttf: "Noto Sans Canadian Aboriginal" "Regular"
NotoSansCarian-Regular.ttf: "Noto Sans Carian" "Regular"
NotoSansCham-Regular.ttf: "Noto Sans Cham" "Regular"
NotoSansCherokee-Regular.ttf: "Noto Sans Cherokee" "Regular"
NotoSansCoptic-Regular.ttf: "Noto Sans Coptic" "Regular"
NotoSansCuneiform-Regular.ttf: "Noto Sans Cuneiform" "Regular"
NotoSansCypriot-Regular.ttf: "Noto Sans Cypriot" "Regular"
NotoSansDeseret-Regular.ttf: "Noto Sans Deseret" "Regular"
NotoSansDevanagari-Regular.ttf: "Noto Sans Devanagari" "Regular"
NotoSansDuployan-Regular.ttf: "Noto Sans Duployan" "Regular"
NotoSansEgyptianHieroglyphs-Regular.ttf: "Noto Sans Egyptian Hieroglyphs" "Regular"
NotoSansElbasan-Regular.ttf: "Noto Sans Elbasan" "Regular"
NotoSansEthiopic-Regular.ttf: "Noto Sans Ethiopic" "Regular"
NotoSansGlagolitic-Regular.ttf: "Noto Sans Glagolitic" "Regular"
NotoSansGothic-Regular.ttf: "Noto Sans Gothic" "Regular"
NotoSansGrantha-Regular.ttf: "Noto Sans Grantha" "Regular"
NotoSansGurmukhi-Regular.ttf: "Noto Sans Gurmukhi" "Regular"
NotoSansHanunoo-Regular.ttf: "Noto Sans Hanunoo" "Regular"
NotoSansHatran-Regular.ttf: "Noto Sans Hatran" "Regular"
NotoSansHebrew-Regular.ttf: "Noto Sans Hebrew" "Regular"
NotoSansImperialAramaic-Regular.ttf: "Noto Sans Imperial Aramaic" "Regular"
NotoSansIndicSiyaqNumbers-Regular.ttf: "Noto Sans Indic Siyaq Numbers" "Regular"
NotoSansInscriptionalPahlavi-Regular.ttf: "Noto Sans Inscriptional Pahlavi" "Regular"
NotoSansInscriptionalParthian-Regular.ttf: "Noto Sans Inscriptional Parthian" "Regular"
NotoSansJavanese-Regular.ttf: "Noto Sans Javanese" "Regular"
NotoSansKaithi-Regular.ttf: "Noto Sans Kaithi" "Regular"
NotoSansKayahLi-Regular.ttf: "Noto Sans Kayah Li" "Regular"
NotoSansKharoshthi-Regular.ttf: "Noto Sans Kharoshthi" "Regular"
NotoSansKhudawadi-Regular.ttf: "Noto Sans Khudawadi" "Regular"
NotoSansLao-Regular.ttf: "Noto Sans Lao" "Regular"
NotoSansLepcha-Regular.ttf: "Noto Sans Lepcha" "Regular"
NotoSansLimbu-Regular.ttf: "Noto Sans Limbu" "Regular"
NotoSansLinearA-Regular.ttf: "Noto Sans Linear A" "Regular"
NotoSansLinearB-Regular.ttf: "Noto Sans Linear B" "Regular"
NotoSansLycian-Regular.ttf: "Noto Sans Lycian" "Regular"
NotoSansLydian-Regular.ttf: "Noto Sans Lydian" "Regular"
NotoSansMahajani-Regular.ttf: "Noto Sans Mahajani" "Regular"
NotoSansMalayalam-Regular.ttf: "Noto Sans Malayalam" "Regular"
NotoSansMandaic-Regular.ttf: "Noto Sans Mandaic" "Regular"
NotoSansManichaean-Regular.ttf: "Noto Sans Manichaean" "Regular"
NotoSansMarchen-Regular.ttf: "Noto Sans Marchen" "Regular"
NotoSansMayanNumerals-Regular.ttf: "Noto Sans Mayan Numerals" "Regular"
NotoSansMeeteiMayek-Regular.ttf: "Noto Sans Meetei Mayek" "Regular"
NotoSansMendeKikakui-Regular.ttf: "Noto Sans Mende Kikakui" "Regular"
NotoSansMeroitic-Regular.ttf: "Noto Sans Meroitic" "Regular"
NotoSansMiao-Regular.ttf: "Noto Sans Miao" "Regular"
NotoSansModi-Regular.ttf: "Noto Sans Modi" "Regular"
NotoSansMongolian-Regular.ttf: "Noto Sans Mongolian" "Regular"
NotoSansMro-Regular.ttf: "Noto Sans Mro" "Regular"
NotoSansMultani-Regular.ttf: "Noto Sans Multani" "Regular"
NotoSansNKo-Regular.ttf: "Noto Sans NKo" "Regular"
NotoSansNabataean-Regular.ttf: "Noto Sans Nabataean" "Regular"
NotoSansNewTaiLue-Regular.ttf: "Noto Sans New Tai Lue" "Regular"
NotoSansOlChiki-Regular.ttf: "Noto Sans Ol Chiki" "Regular"
NotoSansOldNorthArabian-Regular.ttf: "Noto Sans Old North Arabian" "Regular"
NotoSansOldPermic-Regular.ttf: "Noto Sans Old Permic" "Regular"
NotoSansOldPersian-Regular.ttf: "Noto Sans Old Persian" "Regular"
NotoSansOldSogdian-Regular.ttf: "Noto Sans Old Sogdian" "Regular"
NotoSansOldSouthArabian-Regular.ttf: "Noto Sans Old South Arabian" "Regular"
NotoSansOldTurkic-Regular.ttf: "Noto Sans Old Turkic" "Regular"
NotoSansOsage-Regular.ttf: "Noto Sans Osage" "Regular"
NotoSansOsmanya-Regular.ttf: "Noto Sans Osmanya" "Regular"
NotoSansPahawhHmong-Regular.ttf: "Noto Sans Pahawh Hmong" "Regular"
NotoSansPalmyrene-Regular.ttf: "Noto Sans Palmyrene" "Regular"
NotoSansPauCinHau-Regular.ttf: "Noto Sans Pau Cin Hau" "Regular"
NotoSansPhagsPa-Regular.ttf: "Noto Sans PhagsPa" "Regular"
NotoSansPhoenician-Regular.ttf: "Noto Sans Phoenician" "Regular"
NotoSansPsalterPahlavi-Regular.ttf: "Noto Sans Psalter Pahlavi" "Regular"
NotoSansRejang-Regular.ttf: "Noto Sans Rejang" "Regular"
NotoSansRunic-Regular.ttf: "Noto Sans Runic" "Regular"
NotoSansSamaritan-Regular.ttf: "Noto Sans Samaritan" "Regular"
NotoSansSaurashtra-Regular.ttf: "Noto Sans Saurashtra" "Regular"
NotoSansShavian-Regular.ttf: "Noto Sans Shavian" "Regular"
NotoSansSoraSompeng-Regular.ttf: "Noto Sans Sora Sompeng" "Regular"
NotoSansSundanese-Regular.ttf: "Noto Sans Sundanese" "Regular"
NotoSansSylotiNagri-Regular.ttf: "Noto Sans Syloti Nagri" "Regular"
NotoSansSymbols-Regular.ttf: "Noto Sans Symbols" "Regular"
NotoSansSyriac-Regular.ttf: "Noto Sans Syriac" "Regular"
NotoSansTagalog-Regular.ttf: "Noto Sans Tagalog" "Regular"
NotoSansTagbanwa-Regular.ttf: "Noto Sans Tagbanwa" "Regular"
NotoSansTaiLe-Regular.ttf: "Noto Sans Tai Le" "Regular"
NotoSansTaiViet-Regular.ttf: "Noto Sans Tai Viet" "Regular"
NotoSansTakri-Regular.ttf: "Noto Sans Takri" "Regular"
NotoSansTamil-Regular.ttf: "Noto Sans Tamil" "Regular"
NotoSansTelugu-Regular.ttf: "Noto Sans Telugu" "Regular"
NotoSansThaana-Regular.ttf: "Noto Sans Thaana" "Regular"
NotoSansThai-Regular.ttf: "Noto Sans Thai" "Regular"
NotoSansUgaritic-Regular.ttf: "Noto Sans Ugaritic" "Regular"
NotoSansVai-Regular.ttf: "Noto Sans Vai" "Regular"
NotoSansWarangCiti-Regular.ttf: "Noto Sans Warang Citi" "Regular"
NotoSansYi-Regular.ttf: "Noto Sans Yi" "Regular"
NotoSerifBalinese-Regular.ttf: "Noto Serif Balinese" "Regular"
NotoSerifGujarati-Regular.ttf: "Noto Serif Gujarati" "Regular"
NotoSerifTangut-Regular.ttf: "Noto Serif Tangut" "Regular"
NotoSansTaiTham-Regular.ttf: "Noto Sans Tai Tham" "Regular"
NotoSansOriya-Regular.ttf: "Noto Sans Oriya" "Regular"
SyrCOMKharput.otf: "Serto Kharput" "Regular"
NotoSansTamilSupplement-Regular.ttf: "Noto Sans Tamil Supplement" "Regular"
NotoSerifDogra-Regular.ttf: "Noto Serif Dogra" "Regular"
DejaVuSansMono-Bold.ttf: "DejaVu Sans Mono" "Bold"
DejaVuSerif-Italic.ttf: "DejaVu Serif" "Italic"
UTRG__12-ISO8859-1.pcf.gz: "Adobe Utopia" "Regular"
7x13-ISO8859-1.pcf.gz: "Misc Fixed" "Regular"
ter-x12n.pcf.gz: "xos4 Terminus" "Regular"
12x13ja.pcf.gz: "Misc Fixed Wide" "ja"
6x13.pcf.gz: "Misc Fixed" "SemiCondensed"
9x15.pcf.gz: "Misc Fixed" "Regular"
creep-16.bdf: "creep" "Regular"
cu12.pcf.gz: "MUTT ClearlyU Wide" "Regular"
cu-alt12.pcf.gz: "MUTT ClearlyU Alternate Glyphs Wide" "Regular"
cu-pua12.pcf.gz: "MUTT ClearlyU PUA" "Regular"
18x18ja.pcf.gz: "Misc Fixed Wide" "ja"

there is a fallback listed for every language, so maybe my initial assessment was incorrect.

Last edited by accy (2020-02-21 01:30:19)

Offline

#2 2020-02-21 01:29:45

accy
Member
Registered: 2019-12-23
Posts: 4

Re: [SOLVED] Bitmap Fonts not Falling Back DWM/DMenu

the problem was with manually specifying the font file. apparently if you do this, fontconfig will not fall back.

you can use `fc-match -a` (pipe it into grep) to find out what fontconfig wants your font to be called. In the terminus example, it's "xos4 Terminus".
so, if we invoke dmenu this way

echo english日本語 | dmenu -fn "xos4 Terminus:pixelsize=12"

our output is as expected.

Offline

Board footer

Powered by FluxBB