bug-gnustep
[Top][All Lists]
Advanced

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

Re: i dont know if it is a bug in gui but i suppose to


From: Fred Kiefer
Subject: Re: i dont know if it is a bug in gui but i suppose to
Date: Sat, 31 Jan 2004 13:56:24 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030821

Reuss Andras wrote:
i have a
window rect(300,300,200,100)
and a
[[[NSTextField alloc] initWithFrame: NSMakeRect(30,50,140,20)] setStringValue: @"Öt 
szûz õrült tizenharom írót nyúz"];
in case of
[[window dataWithEPSInsideRect: NSMakeRect(0, 0, 199, 99)] writeToFile: 
@"afile" atomically: YES];
there is always a
newpath
88 -4.5 moveto
after the 16th character that distorts the output. I tried to find the cause of 
this bug (if it is) in the source files, but grep did not output any 'newpath' 
string in the gui source directory, sorry.
is it a bug? and the following:
why the output of button is gray if the background of the window is white? i 
think it should be gray too or the button white.
best regards
andras reuss

Hi Andras,

you did run into a number of different issues here. First the constant strings shoudl only contain ASCII characters. So when you need to set up your (hungarian?) string you have to do something like:
[[NSString alloc] initWithBytes: "Öt szûz õrült tizenharom írót nyúz"
                             length: 34
                             encoding: NSISOLatin1StringEncoding];

This is correcter, but does not make an actual difference, as our current implemetnation handles ISOLatin correctly most of the times.

Teh drawing being split up in chunks of 16 is an artefact of the NSLayoutManager. This normally would not make any difference, as the layout manager knows the position of every glyph and computes the following moveto correctly. But when doing output to PS files the metrics of the fonts the layout manager uses are different from the actual PS fonts and this will give wrong results when displayed. Also when you use the xlib backend, which does not provide the method nameOfGlyph: on GSFontInfo the glyhs will be output as a string (which gives invalid PS) and this will result in the conversion of the PS output file into ASCII data to fail and the result file would be empty.

As for the second problem (button drawing its background in fixed colour), I will look into this now and probably change the NSButtonCell to use the new drawing functions.

Fred





reply via email to

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