Use a ServerFont instance which is assigned to the currently
used font, so that the FontStyle reference count reflects the fact that the AGG engine might still use the font -> I think this "fix" is valid, but I have still seen crashes in the freetype code. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14446 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ccdfe4055f
commit
00e0821ffd
@ -70,6 +70,7 @@ AGGTextRenderer::AGGTextRenderer()
|
||||
fKerning(true),
|
||||
fEmbeddedTransformation(),
|
||||
|
||||
fFont(),
|
||||
fLastFamilyAndStyle(0),
|
||||
fLastPointSize(-1.0),
|
||||
fLastHinted(false)
|
||||
@ -111,6 +112,7 @@ AGGTextRenderer::SetFont(const ServerFont &font)
|
||||
|
||||
fLastFamilyAndStyle = font.GetFamilyAndStyle();
|
||||
fEmbeddedTransformation = transform;
|
||||
fFont = font;
|
||||
|
||||
_UpdateSizeAndHinting(font.Size(), fEmbeddedTransformation.IsIdentity() && fHinted, load);
|
||||
|
||||
|
@ -80,6 +80,7 @@ class AGGTextRenderer {
|
||||
Transformable fEmbeddedTransformation; // rotated or sheared font?
|
||||
|
||||
// caching to avoid loading a font unnecessarily
|
||||
ServerFont fFont;
|
||||
uint32 fLastFamilyAndStyle;
|
||||
float fLastPointSize;
|
||||
bool fLastHinted;
|
||||
|
Loading…
x
Reference in New Issue
Block a user