Comment 18 for bug 349914

Revision history for this message
In , Karlt (karlt) wrote :

Comment on attachment 369648
patch v2

create_font and context_key_substitute are not currently used but are provided for a
complete PangoFcFontMap implementation. This is meant to protect from future
changes to Pango that may result in these functions being used, or, less
likely, shaper modules choosing to use these functions.

create_font can be NULL but in that case "new_font() is used", and should not
be NULL. Building two different create_font implementations and choosing at
runtime seems unappealing, so I suggest (unless Behdad suggests otherwise)
to change create_font() to new_font(). context and desc are not used anyway
and there is some history of maintaining backward compatibility for the
deprecated new_font().

context/fontset_key_substitute is probably even less likely to be used, but similarly a
default_substitute implementation would be the same for pre/post 1.23.
Without a context, defaults would need to be used for size and usePrinterFont.
usePrinterFont false is probably the better option, and pangocairo uses 18.0
for the default size, so let's do the same.