Font size in pixels

Point sizes are defined as 1/72 of an inch. That is, a 72-point font is approximately 1 inch from the lowest descent to the highest ascent. So the maximum height of a glyph in a 72pt font is about 1 inch. Apple’s iphone tech specs page claims that the iPhone currently has a resolution of … Read more

How to change the Font Size in a whole Application programmatically, Android?

Android documentation is not specific on the most efficient way to change the font size globally through the user’s selection at application level. There is a problem I think with the answer given by Black Devil. The problem is that many of the Android widgets subclass TextView, such as Button, RadioButton, and CheckBox. Some of … Read more

Change font size of UISegmentedControl

I ran into the same issue. This code sets the font size for the entire segmented control. Something similar might work for setting the font type. Note that this is only available for iOS5+ Obj C: UIFont *font = [UIFont boldSystemFontOfSize:12.0f]; NSDictionary *attributes = [NSDictionary dictionaryWithObject:font forKey:NSFontAttributeName]; [segmentedControl setTitleTextAttributes:attributes forState:UIControlStateNormal]; EDIT: UITextAttributeFont has been deprecated … Read more

Changing Body Font-Size based on Font-Family with jQuery

JavaScript doesn’t have an officially supported way of detecting fonts, but this library is a decent workaround: http://www.lalit.org/lab/javascript-css-font-detect Using this detector, you can then use: $(function(){ var fontDetector = new Detector(); if(fontDetector.test(‘Arial’)){ $(‘body’).css(‘font-size’, ’10px’); } }); Also note that you should only change the font-size property. If you change the font property, you overwrite both … Read more

Font size in CSS – % or em? [duplicate]

There’s a really good article on web typography on A List Apart. Their conclusion: Sizing text and line-height in ems, with a percentage specified on the body (and an optional caveat for Safari 2), was shown to provide accurate, resizable text across all browsers in common use today. This is a technique you can put … Read more