[TIMOB-501] add support for fontStyle:'italic' on Labels
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:53:18.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.3.0 |
Components | iOS |
Labels | font, ios, iphone |
Reporter | Nolan Wright |
Assignee | Jeff Haynie |
Created | 2011-04-15T02:30:24.000+0000 |
Updated | 2011-04-17T01:53:18.000+0000 |
Description
self-explanatory
iPhone font's don't have the concept of font weight (bold) or italics. It's all driven by the font face you choose.
The way we compensate for this for bold is to simply cycle through all the fonts that match the font family passed looking for the first font that has bold in the font name (filtering out italics/oblique).
I can do the same for italics.
However, I suppose i'll need to allow for both bold and italics.
One thing to note, is that if you ask for italics and their's not an italics (or bold) version of that font, it will simply return the first font in the font family specified.
(from [9ffc66304bff9a30d7b6bea67606e5b4580fc47b]) Closes #501: Fonts now support 'fontStyle:' flag, which takes 'italic' or 'normal'. Able to combine with 'fontWeight:'. http://github.com/appcelerator/titanium_mobile/commit/9ffc66304bff9a30d7b6bea67606e5b4580fc47b"> http://github.com/appcelerator/titanium_mobile/commit/9ffc66304bff9...
Brief comment: Users should be aware that Helvetica does not support 'bold italic', meaning that the (usual?) system default won't accept this. Code is there anyway.