Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Printing slowness with AppleSymbols font



Greetings Carbon life forms,

I've been working on printing in my app and I have encountered a few problems. First I'm finding an extreme slowness when printing (via Print dialog -> Preview button) any space, tab or U+2588 (FULL BLOCK) characters in the AppleSymbols font. Every page that contains these glyphs prints slowly. In my tests on each full page of styled text (plus some small graphics) there are an average of 20 occurrences of these glyphs. If I change the font to Arial or the characters to Xs, for instance, printing is 10 x as fast (but, of course, it doesn't look right).

I'm calling ATSUDrawText and using the CGContextRef returned by PMSessionGetGraphicsContext(... kPMGraphicsContextCoreGraphics ...). However, I don't think that this is a problem with my code FLW. (Famous Last Words)

I grabbed this Time Profile with Shark:

96.7% 96.7% ATS ZGetGlyphID(sfntPostScriptInfo const*, unsigned long, char const*, unsigned long, unsigned short*)
0.0% 96.7% ATS _eATSFontGetGlyphIDsForGlyphNames
0.0% 96.7% ATS ATSFontGetGlyphIDsForGlyphNames
0.0% 96.7% libCGATS.A.dylib ats_get_glyphs_for_glyph_names
0.0% 96.7% libPDFRIP.A.dylib buildEncodingMap
0.0% 96.7% libPDFRIP.A.dylib PDFFontSubsetCreate
0.0% 96.7% libPDFRIP.A.dylib PDFFontSimpleInit
0.0% 96.7% libPDFRIP.A.dylib PDFFontSetAddFont
0.0% 96.7% libPDFRIP.A.dylib emitGlyphs
0.0% 96.7% libPDFRIP.A.dylib PDFContentStreamDrawText
0.0% 96.7% libPDFRIP.A.dylib pdf_DrawGlyphs
0.0% 96.7% CoreGraphics CGContextDelegateDrawGlyphs
0.0% 96.7% CoreGraphics drawGlyphs
0.0% 96.7% CoreGraphics CGContextShowGlyphsWithAdvances
0.0% 96.7% QD RenderGlyphRecordArrayWithCG
0.0% 96.7% QD ATSUDrawGlyphs(ATSGlyphVector*, unsigned long, unsigned long, FixedPoint*, CGContext*)
0.0% 96.7% QD TTextLineLayout::DrawText(unsigned long, unsigned long, long, long)
0.0% 96.7% QD ATSUDrawText


When using Arial instead Shark shows about 18-30% in the same code, but it's too short a time to grab a good sample (< 1 sec).

FYI I'm running OSX 10.4.2 on a 2x2.5GHz G5 and targeting the 10.3.9 SDK.

So, Is there any way I can make this print faster? (Or should I just shoot another bug report at the Radar black hole?)
Any help or insights anyone can offer me (relating to this problem) will be greatly appreciated.


More problems latter,

The Doc


_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.