flex4 - Flex font rendering differences from 4.1 to 4.5 -
i'm upgrading app flex 4.1 4.5
we've noticed arial font rendered differently between 2 versions when used @ small sizes.
here's simple app example:
<?xml version="1.0" encoding="utf-8"?> <s:application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minwidth="955" minheight="600"> <fx:style> @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; @font-face { src: url("/assets/fonts/arial.ttf"); fontfamily: arial; embedascff: true; } @font-face { src: url("/assets/fonts/arialbd.ttf"); fontfamily: arial; embedascff: true; font-weight: bold; } global { font-family: arial; } </fx:style> <s:label text="hello world" fontweight="bold" x="20" y="20" /> </s:application> when run against 2 different sdks, here's image of font rendering get:

note in 4.5 font looks squashed.
what's cause of this, , how resolve it?
my best guess it's related the changes made support fonts on handheld devices. fix may have play around style sheet settings bit.
css media queries
can use @media rules in style sheets filter css rules based on device’s dpi classification. there 2 properties can filter on currently, os-platform , application-dpi. here’s example of filtering on them set button font instance (from adobe’s prerelease docs):
@media (os-platform: "android") , (application-dpi: 240) { s|button { fontsize: 10; }
Comments
Post a Comment