[Dillo-dev] Font blacklist

11 views
Skip to first unread message

Sebastian Geerken

unread,
Sep 15, 2015, 2:57:18 PM9/15/15
to dill...@dillo.org
Hi!

After a dist upgrade to Debian Jessie some rather ugly fonts got
installed, which make reading texts tedious. A possible workaround is
attached: a blacklist for fonts (not yet committed). What do you
think?

Sebastian

PS: strcasecmp may not be portable.

font_blacklist.diff
signature.asc

August Karlstrom

unread,
Sep 15, 2015, 3:18:52 PM9/15/15
to dill...@dillo.org
On 2015-09-15 20:55, Sebastian Geerken wrote:
> After a dist upgrade to Debian Jessie some rather ugly fonts got
> installed, which make reading texts tedious.

I run Debian Jessie too and I haven't noticed any ugly fonts. Can you
provide an example?


-- August

_______________________________________________
Dillo-dev mailing list
Dill...@dillo.org
http://lists.dillo.org/cgi-bin/mailman/listinfo/dillo-dev

Sebastian Geerken

unread,
Sep 15, 2015, 3:36:06 PM9/15/15
to dill...@dillo.org
On Di, Sep 15, 2015, August Karlstrom wrote:
> On 2015-09-15 20:55, Sebastian Geerken wrote:
> >After a dist upgrade to Debian Jessie some rather ugly fonts got
> >installed, which make reading texts tedious.
>
> I run Debian Jessie too and I haven't noticed any ugly fonts. Can you
> provide an example?

Helvetica, e. g., which looks rather pixelated, as compared to other
nicely rendered fonts. I'm not sure where this comes from, "apt
dist-uprade" took several hours.

(BTW, I'm also using libfltk1.3-dev from Debian, without any further
configuration.)

Sebastian

signature.asc

Johannes Hofmann

unread,
Sep 15, 2015, 5:00:57 PM9/15/15
to dill...@dillo.org
Hi Sebastian,

On Tue, Sep 15, 2015 at 08:55:30PM +0200, Sebastian Geerken wrote:
> Hi!
>
> After a dist upgrade to Debian Jessie some rather ugly fonts got
> installed, which make reading texts tedious. A possible workaround is
> attached: a blacklist for fonts (not yet committed). What do you
> think?

couldn't one get a similar effect with fontconfig using <rejectfont>?
See
http://www.freedesktop.org/software/fontconfig/fontconfig-user.html

Johannes


>
> Sebastian
>
> PS: strcasecmp may not be portable.
>

> diff -r ea3ff2a0a636 dillorc
> --- a/dillorc Wed Jul 08 18:43:25 2015 +0000
> +++ b/dillorc Tue Sep 15 20:48:19 2015 +0200
> @@ -73,6 +73,12 @@
> # Minimum font size in pixels
> #font_min_size=6
>
> +# Define fonts dillo should not use at all, typically because their quality is
> +# that bad that you prefer alternatives. You can specify multiple fonts.
> +#font_blacklist=uglyfont
> +#font_blacklist=unattractivefont
> +#font_blacklist=awkwardfont
> +
> # Show tooltip popups for HTML title attributes
> #show_tooltip=YES
>
> diff -r ea3ff2a0a636 src/prefs.c
> --- a/src/prefs.c Wed Jul 08 18:43:25 2015 +0000
> +++ b/src/prefs.c Tue Sep 15 20:48:19 2015 +0200
> @@ -51,6 +51,7 @@
> prefs.font_monospace = dStrdup(PREFS_FONT_MONOSPACE);
> prefs.font_sans_serif = dStrdup(PREFS_FONT_SANS_SERIF);
> prefs.font_serif = dStrdup(PREFS_FONT_SERIF);
> + prefs.font_blacklist = dList_new(16);
> prefs.fullwindow_start = FALSE;
>
> /* these four constitute the geometry */
> @@ -138,6 +139,7 @@
> dFree(prefs.font_monospace);
> dFree(prefs.font_sans_serif);
> dFree(prefs.font_serif);
> + dList_free(prefs.font_blacklist);
> a_Url_free(prefs.home);
> dFree(prefs.http_language);
> a_Url_free(prefs.http_proxy);
> diff -r ea3ff2a0a636 src/prefs.h
> --- a/src/prefs.h Wed Jul 08 18:43:25 2015 +0000
> +++ b/src/prefs.h Tue Sep 15 20:48:19 2015 +0200
> @@ -101,6 +101,7 @@
> char *font_cursive;
> char *font_fantasy;
> char *font_monospace;
> + Dlist *font_blacklist;
> bool_t enterpress_forces_submit;
> bool_t middle_click_opens_new_tab;
> bool_t right_click_closes_tab;
> diff -r ea3ff2a0a636 src/prefsparser.cc
> --- a/src/prefsparser.cc Wed Jul 08 18:43:25 2015 +0000
> +++ b/src/prefsparser.cc Tue Sep 15 20:48:19 2015 +0200
> @@ -162,6 +162,7 @@
> { "font_monospace", &prefs.font_monospace, PREFS_STRING, 0 },
> { "font_sans_serif", &prefs.font_sans_serif, PREFS_STRING, 0 },
> { "font_serif", &prefs.font_serif, PREFS_STRING, 0 },
> + { "font_blacklist", &prefs.font_blacklist, PREFS_STRINGS, 0 },
> { "fullwindow_start", &prefs.fullwindow_start, PREFS_BOOL, 0 },
> { "geometry", NULL, PREFS_GEOMETRY, 0 },
> { "home", &prefs.home, PREFS_URL, 0 },
> diff -r ea3ff2a0a636 src/styleengine.cc
> --- a/src/styleengine.cc Wed Jul 08 18:43:25 2015 +0000
> +++ b/src/styleengine.cc Tue Sep 15 20:48:19 2015 +0200
> @@ -391,7 +391,10 @@
> fontName = prefs.font_fantasy;
> else if (dStrAsciiCasecmp (p->value.strVal, "monospace") == 0)
> fontName = prefs.font_monospace;
> - else if (Font::exists(layout, p->value.strVal))
> + else if (Font::exists(layout, p->value.strVal) &&
> + !dList_find_custom(prefs.font_blacklist,
> + p->value.strVal,
> + (dCompareFunc) strcasecmp))
> fontName = p->value.strVal;
>
> if (fontName) { // font found

Walter Dnes

unread,
Sep 15, 2015, 7:06:52 PM9/15/15
to dillo dev list
On Tue, Sep 15, 2015 at 09:34:20PM +0200, Sebastian Geerken wrote
Is Debian's libfltk1.3-dev built with the xft option enabled? If not,
then ugly fonts are to be expected. See...
http://www.dillo.org/screenshots/disable_antialiasing.png

Is there a way to do a custom build of Debian's libfltk1.3-dev?

--
Walter Dnes <walt...@waltdnes.org>

Sebastian Geerken

unread,
Sep 15, 2015, 8:05:47 PM9/15/15
to dill...@dillo.org
On Di, Sep 15, 2015, Walter Dnes wrote:
> On Tue, Sep 15, 2015 at 09:34:20PM +0200, Sebastian Geerken wrote
> > On Di, Sep 15, 2015, August Karlstrom wrote:
> > > On 2015-09-15 20:55, Sebastian Geerken wrote:
> > > >After a dist upgrade to Debian Jessie some rather ugly fonts got
> > > >installed, which make reading texts tedious.
> > >
> > > I run Debian Jessie too and I haven't noticed any ugly fonts. Can you
> > > provide an example?
> >
> > Helvetica, e. g., which looks rather pixelated, as compared to other
> > nicely rendered fonts. I'm not sure where this comes from, "apt
> > dist-uprade" took several hours.
> >
> > (BTW, I'm also using libfltk1.3-dev from Debian, without any further
> > configuration.)
>
> Is Debian's libfltk1.3-dev built with the xft option enabled? If not,
> then ugly fonts are to be expected. See...
> http://www.dillo.org/screenshots/disable_antialiasing.png

Not looked at it in detail, but since most fonts render nicely, I
assume that the Debian package is indeed build with Xft support.

Sebastian

signature.asc

August Karlstrom

unread,
Sep 16, 2015, 1:00:17 AM9/16/15
to dill...@dillo.org
On 2015-09-15 21:34, Sebastian Geerken wrote:
> Helvetica, e. g., which looks rather pixelated, as compared to other
> nicely rendered fonts. I'm not sure where this comes from, "apt
> dist-uprade" took several hours.

I don't have Helvetica. However, I have installed
ttf-mscorefonts-installer and if the CSS says

font-family: Helvetica, sans-serif

Iceweasel seems to chooses Arial (from mscorefonts) whereas Dillo
chooses the default DejaVu sans-serif font.

Sebastian Geerken

unread,
Sep 16, 2015, 3:08:41 PM9/16/15
to dill...@dillo.org
On Di, Sep 15, 2015, Johannes Hofmann wrote:
> On Tue, Sep 15, 2015 at 08:55:30PM +0200, Sebastian Geerken wrote:
> > After a dist upgrade to Debian Jessie some rather ugly fonts got
> > installed, which make reading texts tedious. A possible workaround is
> > attached: a blacklist for fonts (not yet committed). What do you
> > think?
>
> couldn't one get a similar effect with fontconfig using <rejectfont>?
> See
> http://www.freedesktop.org/software/fontconfig/fontconfig-user.html

Yes, thanks for the hint. With this info, I withdraw my patch.

Perhaps this could be added to the dillo help page.

Sebastian

signature.asc
Reply all
Reply to author
Forward
0 new messages