On Tue, Jul 05, 2005 at 08:46:43AM +0100, Ben Fowler wrote:
On 7/4/05, Bryce Harrington <bryce@...260...> wrote:
On Mon, Jul 04, 2005 at 09:26:02AM +0100, Ben Fowler wrote:
On 7/4/05, Bryce Harrington <bryce@...260...> wrote:
... libnrtype/Layout-TNG-Output.cpp: In function ...
I have patches for these, do you want to see them?
Yes, please do!
The enumeration value `PANGO_WEIGHT_SEMIBOLD' is guarded by a highly questionable #ifdef, videlicet:
00216 switch (w) { 00217 case PANGO_WEIGHT_ULTRALIGHT: return "ultralight"; 00218 case PANGO_WEIGHT_LIGHT : return "light"; 00219 #ifdef PANGO_WEIGHT_SEMIBOLD // not available on pango before 1.8 00220 case PANGO_WEIGHT_SEMIBOLD : return "semibold"; 00221 #endif 00222 case PANGO_WEIGHT_NORMAL : return "normalweight"; 00223 case PANGO_WEIGHT_BOLD : return "bold"; 00224 case PANGO_WEIGHT_ULTRABOLD : return "ultrabold"; 00225 case PANGO_WEIGHT_HEAVY : return "heavy"; 00226 }
On line 219 it would be irrational for PANGO_WEIGHT_SEMIBOLD to be defined as a pre-processor symbol, it is needed as an enumeration value.
Looks like you're right. This shows it to be an enum:
http://developer.gimp.org/api/2.0/pango/pango-Fonts.html
Also, I haven't seen PANGO_WEIGHT_SEMIBOLD not being available, so my first suggestion would be to remove the conditional compilation, and if this causes problems, choose a non-conflicting symbol for the macro or use the pango version directly.
Agreed, can you remove the conditional, assuming no one disagrees?
Bryce