summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7ef7442)
raw | patch | inline | side by side (parent: 7ef7442)
author | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Sat, 27 Mar 2010 16:15:23 +0000 (17:15 +0100) | ||
committer | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Sat, 27 Mar 2010 16:15:23 +0000 (17:15 +0100) |
src/libnrtype/FontInstance.cpp | patch | blob | history |
index be5eb86c893cc6d7a38d162f32122167bb3adca5..50dbec61d9410bcd87f74bde5f0691d1e01c8e43 100644 (file)
// character has no visual representation, but is valid (eg whitespace)
doAdd=true;
} else {
- std::auto_ptr<char> buffer(new char[bufferSize]);
- if ( GetGlyphOutline (daddy->hScreenDC, glyph_id, GGO_GLYPH_INDEX | GGO_NATIVE | GGO_UNHINTED, &metrics, bufferSize, buffer.get(), &identity) <= 0 ) {
+ char *buffer = new char[bufferSize];
+ if ( GetGlyphOutline (daddy->hScreenDC, glyph_id, GGO_GLYPH_INDEX | GGO_NATIVE | GGO_UNHINTED, &metrics, bufferSize, buffer, &identity) <= 0 ) {
// shit happened
} else {
// Platform SDK is rubbish, read KB87115 instead
n_g.outline=new Path;
DWORD polyOffset=0;
while ( polyOffset < bufferSize ) {
- TTPOLYGONHEADER const *polyHeader=(TTPOLYGONHEADER const *)(buffer.get()+polyOffset);
+ TTPOLYGONHEADER const *polyHeader=(TTPOLYGONHEADER const *)(buffer+polyOffset);
if (polyOffset+polyHeader->cb > bufferSize) break;
if (polyHeader->dwType == TT_POLYGON_TYPE) {
DWORD curveOffset=polyOffset+sizeof(TTPOLYGONHEADER);
while ( curveOffset < polyOffset+polyHeader->cb ) {
- TTPOLYCURVE const *polyCurve=(TTPOLYCURVE const *)(buffer.get()+curveOffset);
+ TTPOLYCURVE const *polyCurve=(TTPOLYCURVE const *)(buffer+curveOffset);
POINTFX const *p=polyCurve->apfx;
POINTFX const *endp=p+polyCurve->cpfx;
}
doAdd=true;
}
+ delete [] buffer;
}
#else
if (FT_Load_Glyph (theFace, glyph_id, FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP)) {