[go: up one dir, main page]

Use of pixel font sizes in ui/style.css is broken

Summary:

Use of pixel font sizes [in style.css] is broken. Don't use them.

Steps to reproduce:

  • Run Inkscape on a high-DPI display?

The above may or may not be sufficient; I've heard reports from others with the same issue (sorry, don't know other issue numbers offhand), but manifestation seems to depend on specifics of the display and GTK's notion of display scale and DPI. For what it's worth, because the UI otherwise uses far to much screen real-estate (to the point that Inkscape is practically unusable), I run (Inkscape specifically) with GDK_SCALE=1 and GDK_DPI_SCALE=1 (These values are otherwise 2 and 0.5 respectively; the latter in particular may have something to do with why this breaks as it does... except that ultimately, using px for font-size is just almost always wrong.)

What happened?

This: unreadable-inkscape

For reference, that text is ~1.5mm tall. Clearly, too, it is much smaller than the reasonably-sized text also visible.

What should have happened?

The text should be readable:

inkscape-readable

Version Info:

- Inkscape Version: approximately 28587f2d2fb0c83bd12c8364994332dea100143b (plus unrelated local changes)
- Operating System: Fedora 33 (Linux)

Additional Information:

Second screenshot was generated with the following patch:

diff --git a/share/ui/style.css b/share/ui/style.css
index 4510663add..b30583498c 100644
--- a/share/ui/style.css
+++ b/share/ui/style.css
@@ -157,7 +157,7 @@ notebook.blink > header > tabs > tab:checked {
 
 /* atribute dialog popup size */
 .attrpop textview {
-    font-size: 13px;
+    font-size: 1em;
 }
 

Note however that the text at the bottom is still too small. Per the summary, an auditing and removal of all px font-sizes is perhaps in order, but I lack the knowledge to do more than guess at appropriate replacements for most instances.