Font question for 2.4.0

Phil Longstaff plongstaff at rogers.com
Sun May 16 13:59:59 EDT 2010


On Thu, 2010-05-13 at 15:09 +1000, Tao Wang wrote:
> Hi,
> 
> How about just set 'default-font-family' to GTK+ default font, and
> leave other '*-font-family' as is?
> 
> In current patch, I set all font same just to make sure every text in
> webkit are set fonts.
> 
> +        g_object_set (G_OBJECT(webkit_settings),
> +            "cursive-font-family", default_font_family,
> +            "default-font-family", default_font_family,
> +            "fantasy-font-family", default_font_family,
> +            "monospace-font-family", default_font_family,
> +            "sans-serif-font-family", default_font_family,	
> +            "serif-font-family", default_font_family,
> +            NULL);
> 
> However, I checked reports and invoices, I didn't find any text font
> are hardcoded set to 'monospace', 'serif' or 'sans-serif'. That is,
> even we set all fonts to be same, the user will not find any
> difference. So, it should be safe just set 'default-font-family' to
> the default font to make CJK or non-ASCII character works, and leave
> 'monospace', 'serif', as is, just for future potential problems, and
> it will become:
> 
> +        g_object_set (G_OBJECT(webkit_settings),
> +            "default-font-family", default_font_family,
> +            NULL);
> 
> So, whether should set all fonts to be same will not be a question.

I can apply this patch.  However, since you've also modified how the
stylesheet creates css to include all text, and I've modified all
stylesheets to provide css for fonts, will this default font ever be
used?  What I am looking at is how to provide this default font to the
stylesheets to replace "Arial" which is hard-coded.

Phil



More information about the gnucash-devel mailing list