bug-gnustep
[Top][All Lists]
Advanced

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

Re: Announce: Cenon


From: Alexander Malmberg
Subject: Re: Announce: Cenon
Date: Thu, 22 Jan 2004 04:20:04 +0100

Georg Fleischmann wrote:
> We are happy to announce Cenon in it's first release as free software
> (Version 3.60 beta 9). You can find Cenon at:

Nice! :)

[snip]
> At the moment we run Cenon with the default X backend. Since
> text scaling and rotation is not implemented there, the Art backend
> might be preferable but is not yet working with Cenon.

Specific bug reports are nice. :)

>From a quick look&test, it seems to be just a matter of fonts. .gmodels
contain hard-coded font names ("Helvetica" and "Helvetica-Bold", in this
case), and most back-art installations don't have these. This can't be
fixed properly (flaw in the format; it'd have to be changed to handle
this correctly), but it seems that the gmodel code shouldn't just fail
if the decoding system doesn't have the exact same font.

Thus, I've attached a patch that makes the gmodel loading code fall back
to the system font if no font with the given name exists. Could someone
more familiar with the gmodel loading check if this is a sane approach
for gmodels?

With this patch, Cenon starts and opens the examples I tested ok. :)

- Alexander Malmberg
Index: GMAppKit.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/gui/Model/GMAppKit.m,v
retrieving revision 1.94
diff -u -r1.94 GMAppKit.m
--- GMAppKit.m  31 Jul 2003 23:52:09 -0000      1.94
+++ GMAppKit.m  22 Jan 2004 03:03:08 -0000
@@ -739,8 +739,11 @@
 
 + (id)createObjectForModelUnarchiver:(GMUnarchiver*)unarchiver
 {
-  return [NSFont fontWithName:[unarchiver decodeStringWithName:@"name"]
+  NSFont *f = [NSFont fontWithName:[unarchiver decodeStringWithName:@"name"]
                 size:[unarchiver decodeFloatWithName:@"size"]];
+  if (!f)
+    f = [NSFont systemFontOfSize: [unarchiver decodeFloatWithName:@"size"]];
+  return f;
 }
 
 - (id)initWithModelUnarchiver:(GMUnarchiver*)unarchiver

reply via email to

[Prev in Thread] Current Thread [Next in Thread]