Your message dated Mon, 16 Jan 2023 08:49:54 +0100 with message-id <[email protected]> and subject line fontconfig-config: 60-latin.conf should prefer the most complete font DejaVu has caused the Debian Bug report #981577, regarding fontconfig should prefer DejaVu over Bitstream Vera to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 981577: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=981577 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: ttf-bitstream-vera Version: 1.10-8.1 Control: affects -1 chromium fontconfig python-matplotlib-data src:fonts-dejavu Textual tables drawn with standard UTF-8 box drawing characters (U+2500…U+25FF) are being mis-rendered by Chromium in a common default configuration. https://dkg.fifthhorseman.net/table.txt ships a text/plain; charset=UTF-8 file contains a simple textual table for testing: ╒══════════════════╤═══════════════════════════╤═════════════════════╕ │ This is a Table │ It contains text │ Implemented with │ ╞══════════════════╪═══════════════════════════╪═════════════════════╡ │ Unicode │ Box drawing │ Characters │ └──────────────────┴───────────────────────────┴─────────────────────┘ It is mis-rendered by default on chromium on systems that have Bitstream Vera Mono installed, like so:If I remove ttf-bitstream-vera from the system, then Chromium renders the text with DejaVu Sans Mono instead, yielding a correct view:I think what's happening is that Chromium selects Vera Sans through fontconfig, and then when it discovers missing glyphs, it falls back to rendering those glyphs in some other font, which does not have the same width as Vera Sans. This results in mis-rendered tables that use unicode box drawing. Possible Solutions ------------------ I see a few different possible fixes, in different places: - Bitstream Vera Mono could implement monospaced glyphs for the unicode box drawing characters - fontconfig could prefer more complete fonts when searching for a match, which would prioritize dejavu sans (or some other more complete font) over bitstream vera - fontconfig could manually prefer DejaVu Sans Mono over Bitstream Vera Mono when given the search string "monospace" - chromium, when substituting missing glyphs in a monospace font, could ensure that the substitute glyphs are appropriately sized for the font they are filling in for. - chromium could hardcode (and depend on?) a preferred monospace font by default that is more complete than Bistream Vera as its default monospace font - We could drop ttf-bitstream-vera from the archive, which would affect packages like python-matplotlib-data, gravit-data, and the ~20 other packages that Depend on ttf-bitstream-vera directly. I can't afford to just purge the package from my system because i need matplotlib :( - fonts-dejavu-core (or fonts-dejavu-extra?) could Provide: ttf-bitstream-vera, since it appears to provide aliases for Bitstream Vera in e.g. /etc/fonts/conf.avail/57-dejavu-sans-mono.conf -- i don't know whether this is sufficient for all the explicit Dependencies of ttf-bitstream-vera, though. Diagnosis --------- Chromium's default monospace font appears to rely on fontconfig for selection. In particular, i think it sends font-config the "monospace" search term, which when Bitstream Vera is installed results in: 0 dkg@alice:~$ fc-match monospace VeraMono.ttf: "Bitstream Vera Sans Mono" "Roman" 0 dkg@alice:~$ Without bitstream-vera installed, it looks like fontconfig will prefer dejavu sans mono, which contains these glyphs and doesn't break the rendering: 0 dkg@alice:~$ fc-match --sort monospace | head VeraMono.ttf: "Bitstream Vera Sans Mono" "Roman" DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book" DejaVuSansMono-Bold.ttf: "DejaVu Sans Mono" "Bold" DejaVuSansMono-Oblique.ttf: "DejaVu Sans Mono" "Oblique" Inconsolata.otf: "Inconsolata" "Medium" Andale_Mono.ttf: "Andale Mono" "Regular" Courier_New.ttf: "Courier New" "Regular" Courier_New_Italic.ttf: "Courier New" "Italic" n022003l.pfb: "Nimbus Mono L" "Regular" NimbusMonoPS-Regular.otf: "Nimbus Mono PS" "Regular" 0 dkg@alice:~$ To verify my suspicion about font replacement characters, i used "fontimage" from the fontforge package to render the files in question explicitly: I tried rendering the table using fontimage with the two fonts: fontimage -o veramono.png --pixelsize 10 \ --text '╒══════════════════╤═══════════════════════════╤═════════════════════╕' \ --text '│ This is a Table │ It contains text │ Implemented with │' \ --text '╞══════════════════╪═══════════════════════════╪═════════════════════╡' \ --text '│ Unicode │ Box drawing │ Characters │' \ --text '└──────────────────┴───────────────────────────┴─────────────────────┘' \ /usr/share/fonts/truetype/ttf-bitstream-vera/VeraMono.ttffontimage -o dejavusansmono.png --pixelsize 10 \ --text '╒══════════════════╤═══════════════════════════╤═════════════════════╕' \ --text '│ This is a Table │ It contains text │ Implemented with │' \ --text '╞══════════════════╪═══════════════════════════╪═════════════════════╡' \ --text '│ Unicode │ Box drawing │ Characters │' \ --text '└──────────────────┴───────────────────────────┴─────────────────────┘' \ /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttfMy takeaway from these two images is that Vera Mono doesn't have the box drawing glyphs at all, but DejaVu Sans Mono does have them. ---- I recognize that this report is likely to be difficult for debian to handle as there are so many different packages that are involved. I've initially assigned it to ttf-bitstream-vera, but if the maintainers of that package think that the best solution lies outside of that package, i hope they'll re-assign it appropriately. Regards, --dkg
signature.asc
Description: PGP signature
--- End Message ---
--- Begin Message ---Version: 2.14.1-1 Upstream dropped Bitstream Vera fonts from 60-latin.conf. Upstream bug report: https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/26 Upstream commit: https://gitlab.freedesktop.org/tagoh/fontconfig/-/commit/fcb042028126d79ea5a5fa015b2b034b98656e73
--- End Message ---

