Bug 190109
| Summary: | Not monospaced | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Дилян Палаузов <dpa-webkit> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED WONTFIX | ||
| Severity: | Normal | CC: | mcatanzaro |
| Priority: | P2 | ||
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Дилян Палаузов
I use WebKit from https://webkitgtk.org/ 2.22.2 with Epiphany 3.30.1 . In the latter I have chosen under “Preferences” as monospace font “Monospace Regular 10”. Visiting pages like https://tools.ietf.org/html/rfc4918 do not show text as monospace. The problem does not seem to be with Epiphany: https://gitlab.gnome.org/GNOME/epiphany/issues/82 . I have compiled WebKitGtk and Epiphany myself.
How can I find out, why WebKit does not render monospaced areas as such?
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Michael Catanzaro
You almost certainly have applied some custom fontconfig contfiguratoion, which is not supportable.
Дилян Палаузов
I did `fontconfig/configure && make install` hence I do not have custom fontconfig configuration.
Michael Catanzaro
It's very hard to believe that this would be broken by default. Please post the output of:
$ fc-match monospace
I think it's almost surely going to return a non-Monospace font. You probably have some fontconfig configuration files in your home directory or something.
Дилян Палаузов
That was it: creating ~/.config/fontconfig/fonts.conf with suitable
<alias>
<family>monospace</family>
<prefer><family>Liberation Mono</family></prefer>
</alias>
tweaked both `fc-match monospace` and WebKit to use correct monospace font.
Michael Catanzaro
Well something is wrong with your fontconfig installation, since that should be configured at the system level, and not require anything in your home directory....
Дилян Палаузов
Perhaps. I installed fonts manually. fontcongig seems to declare in its default configurition files which fonts are preferred monospace.
fc-list :spacing=100 emits
/usr/share/fonts/truetype/anonymous_pro/Anonymous_Pro.ttf: Anonymous Pro:style=Regular
/usr/share/fonts/truetype/ubuntu-font-family-0.80/UbuntuMono-BI.ttf: Ubuntu Mono:style=Bold Italic
/usr/share/fonts/truetype/noto-hints/NotoMono-Regular.ttf: Noto Mono:style=Regular
/usr/share/fonts/truetype/liberation/LiberationMono-BoldItalic.ttf: Liberation Mono:style=Bold Italic
/usr/share/fonts/truetype/noto-hints/NotoEmoji-Regular.ttf: Noto Emoji:style=Regular
/usr/share/fonts/truetype/ubuntu-font-family-0.80/UbuntuMono-RI.ttf: Ubuntu Mono:style=Italic
/usr/share/fonts/truetype/liberation/LiberationMono-Bold.ttf: Liberation Mono:style=Bold
/usr/share/fonts/truetype/ubuntu-font-family-0.80/UbuntuMono-B.ttf: Ubuntu Mono:style=Bold
/usr/share/fonts/truetype/liberation/LiberationMono-Regular.ttf: Liberation Mono:style=Regular
/usr/share/fonts/truetype/liberation/LiberationMono-Italic.ttf: Liberation Mono:style=Italic
/usr/share/fonts/truetype/anonymous_pro/Anonymous_Pro_BI.ttf: Anonymous Pro:style=Bold Italic
/usr/share/fonts/truetype/anonymous_pro/Anonymous_Pro_I.ttf: Anonymous Pro:style=Italic
/usr/share/fonts/truetype/ubuntu-font-family-0.80/UbuntuMono-R.ttf: Ubuntu Mono:style=Regular
/usr/share/fonts/truetype/noto-hints/NotoColorEmoji.ttf: Noto Color Emoji:style=Regular
/usr/share/fonts/truetype/anonymous_pro/Anonymous_Pro_B.ttf: Anonymous Pro:style=Bold
but fc-match monospace printed a totally different font. Apparently for the output of fc-match the font properties are irrelepant and only the fc-configuration files matter, which by default do not mention the files from the list above and have to be set manually.
The conclusion it, that Epiphany lets the user set a monospaced font, but the choice gets ignored, so the case went back to https://gitlab.gnome.org/GNOME/epiphany/issues/82 .