mirror of
https://github.com/gnustep/libs-back.git
synced 2025-05-31 01:11:00 +00:00
Small opal changes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@40047 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
41804841f2
commit
7befdbcf6b
4 changed files with 14 additions and 12 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2016-08-02 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/opal/OpalFontInfo.m
|
||||||
|
Correct the calculation of line height.
|
||||||
|
* Source/opal/OpalGState.m
|
||||||
|
Adjust font placement to changed height.
|
||||||
|
* Source/opal/OpalSurface.m
|
||||||
|
Better debug output.
|
||||||
|
|
||||||
2016-07-15 Fred Kiefer <FredKiefer@gmx.de>
|
2016-07-15 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/gsc/GSStreamContext.m:
|
* Source/gsc/GSStreamContext.m:
|
||||||
|
|
|
@ -108,7 +108,7 @@
|
||||||
// lineHeight = font_extents.height
|
// lineHeight = font_extents.height
|
||||||
// alternatively: line spacing = (ascent + descent + "external leading")
|
// alternatively: line spacing = (ascent + descent + "external leading")
|
||||||
// (internal discussion between ivucica and ericwa, 2013-09-17)
|
// (internal discussion between ivucica and ericwa, 2013-09-17)
|
||||||
lineHeight = leading + ascender - descender;
|
lineHeight = leading + ascender + descender;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// Get default font options
|
// Get default font options
|
||||||
|
|
|
@ -209,8 +209,8 @@ static inline NSPoint _NSPointFromCGPoint(CGPoint cgpoint)
|
||||||
}
|
}
|
||||||
|
|
||||||
CGPoint pt = CGContextGetPathCurrentPoint(cgctx);
|
CGPoint pt = CGContextGetPathCurrentPoint(cgctx);
|
||||||
// FIXME: why * 0.66?
|
// FIXME: why?
|
||||||
pt.y += [self->font defaultLineHeightForFont] * 0.66;
|
pt.y += [self->font defaultLineHeightForFont] * 0.5;
|
||||||
CGContextSetTextPosition(cgctx, pt.x, pt.y);
|
CGContextSetTextPosition(cgctx, pt.x, pt.y);
|
||||||
CGContextShowGlyphsWithAdvances(cgctx, cgglyphs, (const CGSize *)advances,
|
CGContextShowGlyphsWithAdvances(cgctx, cgglyphs, (const CGSize *)advances,
|
||||||
length);
|
length);
|
||||||
|
@ -239,14 +239,6 @@ static inline NSPoint _NSPointFromCGPoint(CGPoint cgpoint)
|
||||||
{
|
{
|
||||||
NSDebugLLog(@"OpalGState", @"%p (%@): %s", self, [self class], __PRETTY_FUNCTION__);
|
NSDebugLLog(@"OpalGState", @"%p (%@): %s", self, [self class], __PRETTY_FUNCTION__);
|
||||||
|
|
||||||
if (!pat && size != 0)
|
|
||||||
{
|
|
||||||
NSLog(@"%s: null 'pat' passed with size %d. Fixing by setting size to 0.", pat, (int)size);
|
|
||||||
size = 0;
|
|
||||||
// TODO: looking at opal, it does not seem to have a tolerance for
|
|
||||||
// pat=NULL although CGContextSetLineDash() explicitly specifies that
|
|
||||||
// as a possible argument
|
|
||||||
}
|
|
||||||
CGContextRef cgctx = CGCTX;
|
CGContextRef cgctx = CGCTX;
|
||||||
|
|
||||||
if (cgctx)
|
if (cgctx)
|
||||||
|
|
|
@ -109,7 +109,8 @@ static CGContextRef createCGBitmapContext(int pixelsWide,
|
||||||
_gsWindowDevice->buffer_height);
|
_gsWindowDevice->buffer_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
NSDebugLLog(@"OpalSurface", @"Created CGContexts: X11=%p, backing=%p", _x11CGContext, _backingCGContext);
|
NSDebugLLog(@"OpalSurface", @"Created CGContexts: X11=%p, backing=%p, width=%d height=%d",
|
||||||
|
_x11CGContext, _backingCGContext, _gsWindowDevice->buffer_width, _gsWindowDevice->buffer_height);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue