Better font scaling needed - does Pango evolution help?
Submitted by an unknown user
Link to original bug (#162034)
Description
Too well known: Dia has a problem scaling fonts.
The problem: For diffenrent zoom level the text should scale linear with the other diagram elements. But font scaling isn't that simple - i.e. the text width does not scale linear with the height.
The current approach: a loop feeding tweaked font heights into Pango until the text has almost the desired width. Obvious drawback - so slow that it needs a cache. Also sometimes this approach fails cause Pango simply does not deliver the right sizes: WARNING **: Failed to appropriately tweak zoomed font
First try : Use the new (Pango 1.6, 1.8?) render_transformed facility. With a matrix it should be possible to scale the text linear - that is keep the font size as the user selected it and adapt for zooming with pango_context_set_matrix()
But looking at the results produced by the following patch it does not work as expected ;( Maybe either because there are bugs in the patch - or worse because my interpretation of applying a matrix to a font and that of Pango differ)
Having found only one FC_Set_Transform() in all of Pango I suspect the latter ...
Version: CVS head