Re: CJK Fonts

Rodrigo Arias <[email protected]> Sun, 14 Dec 2025 22:25:36 +0100
Newsgroups gmane.comp.web.dillo.devel
Message-ID <[email protected]>
Hi,

On Sun, Dec 14, 2025 at 10:49:56PM +0000, [email protected] wrote:
>Hi,
>
>"B Hiltz" <bbbhltz-cl+VPiYnx/[email protected]> wrote:
>
>> I think I have compiled something wrong on my end. When visiting sites
>> with CJK fonts (e.g.
>> https://www.unicode.org/standard/translations/japanese.html) none of
>> the characters display (just empty blocks).

This email didn't reach my inbox or spam folder (maybe gmail delayed 
it).

>Do you have the desired font configured in ~/.dillo/dillorc ?
>
>Something like this should work (assuming you have the font available in
>your OS):
>
>font_sans_serif="Noto Sans JP"

You can use fc-match to see what a given font resolves to in your 
system. As I don't have Noto, it resolves DejaVu which doesn't handle 
Japanese either:

   % fc-match 'Noto Sans JP'
   DejaVuSans.ttf: "DejaVu Sans" "Book"

This is the same problem I described in fedi for Emojis:

https://fosstodon.org/@dillo/115702790786501718
https://fosstodon.org/@dillo/115702838816687466

To make it work you can specify a font that has Japanese glyphs like 
Alex suggested or use a CSS rule in ~/.dillo/style.css in case the site 
doesn't use "sans-serif" as the font.

I tried myself installing noto-fonts and noto-fonts-cjk, but then:

   % fc-match 'Noto Sans JP'
   NotoSans-Regular.ttf: "Noto Sans" "Regular"

Doesn't find it, it seems to be called "Noto Sans CJK JP":

   % fc-match 'Noto Sans CJK JP'
   NotoSansCJK-Regular.ttc: "Noto Sans CJK JP" "Regular"

So this did it for me:

   % grep Noto ~/.dillo/dillorc
   font_sans_serif="Noto Sans CJK JP"

Hopefully this won't be needed in FLTK 1.4, which has font substitution 
support (it will find a fallback font in your system that has Japanese).

Best,
Rodrigo.
_______________________________________________
Dillo-dev mailing list -- dillo-dev-lx9mn2B4QYRWk0Htik3J/[email protected]
To unsubscribe send an email to dillo-dev-leave-lx9mn2B4QYRWk0Htik3J/[email protected]