Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001823graphvizDotpublic2010-02-21 09:422011-04-28 04:03
Assigned Toerg 
PlatformOS*-*-OS Version
Summary0001823: Font families which contain spaces must be terminated by a comma in Pango


Another font related issue. When the font family passed to Pango function
pango_font_description_from_string contains a space (for example default
font Times-Roman is translated to PS font "Times Roman"), it apparently
needs to be terminated by a comma.

The Pango documentation I have been able to find isn't particular clear
on this point, suggesting that the comma is optional. However my tests
indicate it is only optional when the family name does not contain spaces.

Without the comma, Pango seems to only consider the first word as the
family name (e.g. "Times") which results in an incorrect native font
potentially being selected.

Please consider the patch below.


Patch applied in CVS.
Great - very much appreciated.
This was baffling me for a long time.

One thing for Emden and John:
is our fixed character buf OK
or does this create a stack smashing

I believe this use of a fixed buf is OK, although there is no science applied to choosing its size.

The pa->* strings all come from the PostScriptAlias data which we provide.

I believe the only static buffer which remains a real hole is gvprintf.
TagsNo tags attached.
diff --git a/plugin/pango/gvtextlayout_pango.c b/plugin/pango/gvtextlayout_pango.c
index 6fc4d5d..f6ab372 100644
--- a/plugin/pango/gvtextlayout_pango.c
+++ b/plugin/pango/gvtextlayout_pango.c
@@ -37,6 +37,7 @@ static char* pango_psfontResolve (Pos
STATUS-COMMENTFixed (21 Feb 2010)
VERSION     2.26.3
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-04-28 04:03 user1 New Issue
2011-04-28 04:03 user1 Assigned To => erg

MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker