mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 15:31:14 +00:00
Make -xlib glyph drawing actually work.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/text-system-branch@15713 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5ce6ead747
commit
7e54e87afa
2 changed files with 19 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-01-26 18:17 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/xlib/XGFont.m: Make -GSShowGlyphs::'s helpers actually
|
||||
work.
|
||||
|
||||
2003-01-26 17:22 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Headers/xlib/XGPrivate.h, Source/xlib/XGFont.m,
|
||||
|
|
|
@ -213,7 +213,13 @@ static BOOL XGInitAtoms(Display *dpy)
|
|||
with: (GC) xgcntxt at: (XPoint) xp
|
||||
{
|
||||
// This font must already be active!
|
||||
XDrawString16(xdpy, draw, xgcntxt, xp.x, xp.y, glyphs, len);
|
||||
unsigned char buf[len];
|
||||
int i;
|
||||
for (i=0;i<len;i++)
|
||||
{
|
||||
buf[i]=glyphs[i];
|
||||
}
|
||||
XDrawString(xdpy, draw, xgcntxt, xp.x, xp.y, buf, len);
|
||||
}
|
||||
|
||||
- (float) widthOfString: (NSString*)string
|
||||
|
@ -234,7 +240,13 @@ static BOOL XGInitAtoms(Display *dpy)
|
|||
|
||||
- (float) widthOfGlyphs: (const NSGlyph *) glyphs lenght: (int) len
|
||||
{
|
||||
return XTextWidth16(font_info, glyphs, len);
|
||||
unsigned char buf[len];
|
||||
int i;
|
||||
for (i=0;i<len;i++)
|
||||
{
|
||||
buf[i]=glyphs[i];
|
||||
}
|
||||
return XTextWidth(font_info, buf, len);
|
||||
}
|
||||
|
||||
- (void) setActiveFor: (Display*) xdpy gc: (GC) xgcntxt
|
||||
|
|
Loading…
Reference in a new issue