Re: pango fonts default aliases --> gnome fonts?



On Tue, 2003-01-28 at 09:02, Radek Doulík wrote:
> Hi,
> 
> I am trying to make gtkhtml work better with gnome print 2.2 and I have
> run into the following problem.
> 
> When I request GnomeFont for family 'Sans' (one of three default Pango
> aliases), I get different font from Pango one - it lacks some i18n
> glyphs. My guess is that gnome print doesn't find the Sans font and gets
> 1st known available font.
> 
> What do you recommend to use in place of the Sans font? Is there a
> similar font alias in gnome print?

Try to get "Sans Regular" from gnome-print. The alias we have in
gnome-print are:
	GPAliasInfo aliases[] = {
		{ "Sans Regular",          "sans-serif", FC_SLANT_ROMAN,  FC_WEIGHT_MEDIUM },
		{ "Sans Bold",             "sans-serif", FC_SLANT_ROMAN,  FC_WEIGHT_BOLD },
		{ "Sans Italic",           "sans-serif", FC_SLANT_ITALIC, FC_WEIGHT_MEDIUM },
		{ "Sans Bold Italic",      "sans-serif", FC_SLANT_ITALIC, FC_WEIGHT_BOLD },
		{ "Serif Regular",         "serif",      FC_SLANT_ROMAN,  FC_WEIGHT_MEDIUM },
		{ "Serif Bold",            "serif",      FC_SLANT_ROMAN,  FC_WEIGHT_BOLD },
		{ "Serif Italic",          "serif",      FC_SLANT_ITALIC, FC_WEIGHT_MEDIUM },
		{ "Serif Bold Italic",     "serif",      FC_SLANT_ITALIC, FC_WEIGHT_BOLD },
		{ "Monospace Regular",     "monospace",  FC_SLANT_ROMAN,  FC_WEIGHT_MEDIUM },
		{ "Monospace Bold",        "monospace",  FC_SLANT_ROMAN,  FC_WEIGHT_BOLD },
		{ "Monospace Italic",      "monospace",  FC_SLANT_ITALIC, FC_WEIGHT_MEDIUM },
		{ "Monospace Bold Italic", "monospace",  FC_SLANT_ITALIC, FC_WEIGHT_BOLD },
		{ NULL }
	};

The second, third and fourth element of each row are the parameters to fontconfig in:

match_pattern = FcPatternBuild (NULL,
				FC_FAMILY, FcTypeString,  aliases[i].family,
				FC_SLANT,  FcTypeInteger, aliases[i].slant,
				FC_WEIGHT, FcTypeInteger, aliases[i].weight,
				NULL);

hope this helps,
Chema





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]