[TIMOB-6055] iOS: Serif generic font selector not supported on iOS
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2017-06-07T20:41:32.000+0000 |
Affected Version/s | Release 1.7.5 |
Fix Version/s | n/a |
Components | iOS |
Labels | parity |
Reporter | Arthur Evans |
Assignee | Ingo Muschenetz |
Created | 2011-11-07T14:09:17.000+0000 |
Updated | 2017-06-07T20:41:32.000+0000 |
Description
On Android, the fontFamily can use the generic specifiers 'serif', 'sans-serif', or 'monospace' to select the default system serif, sans-serif, or monospaced font. These also work in CSS, so web developers are used to using them.
The 'monospace' selector is implemented on iOS, and the 'sans-serif' selector works by accident (since the default font is sans-serif). However, 'serif' is not recognized. Compare the results of the following code snippet on iOS and Android:
function makeLabel(labelText, labelFont)
{
return Titanium.UI.createLabel({
top: 20,
text:labelText,
font:labelFont,
width:'auto',
height:'auto'
});
}
win2.add(makeLabel('Sans-Serif', { fontFamily:'sans-serif', fontSize: 30} ));
win2.add(makeLabel('Serif', { fontFamily:'serif', fontSize: 30} ));
win2.add(makeLabel('Monospace', { fontFamily:'monospace', fontSize:30} ));
Closing ticket due to time passed and lack of progress in the past 5 years.