Issue 124122 - CoreText: Emulate bold for fonts that do not provide bold themselves
Summary: CoreText: Emulate bold for fonts that do not provide bold themselves
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: 4.1.0-dev
Hardware: Mac Mac OS X, all
: P3 Normal (vote)
Target Milestone: 4.1.0
Assignee: hdu@apache.org
QA Contact:
URL:
Keywords:
Depends on: 123951
Blocks:
  Show dependency tree
 
Reported: 2014-01-27 13:54 UTC by hdu@apache.org
Modified: 2022-10-28 12:54 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
test-document with Andale Mono that doesn't provide Bold styles (16.99 KB, application/vnd.oasis.opendocument.text)
2014-01-28 11:56 UTC, hdu@apache.org
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description hdu@apache.org 2014-01-27 13:54:14 UTC
A couple of fonts don't provide bold typefaces themselves. Emulating boldness using their regular version can give a reasonable approximation and it allows to distinguish texts that only differ in their "weight" attribute.
Comment 1 hdu@apache.org 2014-01-27 14:16:35 UTC
The CoreText string attribute kCTStrokeWidthAttributeName looks like a good candidate to accomplish such an emulation. It's been available since OSX 10.6, so it is covered in our new platform baseline.
Comment 2 hdu@apache.org 2014-01-28 11:56:47 UTC
Created attachment 82412 [details]
test-document with Andale Mono that doesn't provide Bold styles
Comment 3 SVN Robot 2014-01-28 13:18:43 UTC
"hdu" committed SVN revision 1562059 into trunk:
#i124122# emulate bold font weights for CoreText if needed
Comment 4 hdu@apache.org 2014-01-28 13:23:16 UTC
Fixed with the commit above. Using the weight ratio of requested vs. available font allows the emulation of all bold font weights (semibold, bold ultra bold and black).