Get font scaling factor to calculate the fontsize

I just found in the source code of Settings.System this function: /** @hide */ public static void getConfigurationForUser(ContentResolver cr, Configuration outConfig, int userHandle) { outConfig.fontScale = Settings.System.getFloatForUser( cr, FONT_SCALE, outConfig.fontScale, userHandle); if (outConfig.fontScale < 0) { outConfig.fontScale = 1; } } There is however the FONT_SCALE in usage so I checked for that Configuration class … Read more

CSS: 100% font size – 100% of what?

The browser default which is something like 16pt for Firefox, You can check by going into Firefox options, clicking the Content tab, and checking the font size. You can do the same for other browsers as well. I personally like to control the default font size of my websites, so in a CSS file that … Read more

How to determine artificial bold style ,artificial italic style and artificial outline style of a text using PDFBOX

The general procedure and a PDFBox issue In theory one should start this by deriving a class from PDFTextStripper and overriding its method: /** * Write a Java string to the output stream. The default implementation will ignore the <code>textPositions</code> * and just calls {@link #writeString(String)}. * * @param text The text to write to … Read more

How to convert to px?

<font size=1>- font size 1</font><br> <span style=”font-size:0.63em”>- font size: 0.63em</span><br> <font size=2>- font size 2</font><br> <span style=”font-size: 0.82em”>- font size: 0.82em</span><br> <font size=3>- font size 3</font><br> <span style=”font-size: 1.0em”>- font size: 1.0em</span><br> <font size=4>- font size 4</font><br> <span style=”font-size: 1.13em”>- font size: 1.13em</span><br> <font size=5>- font size 5</font><br> <span style=”font-size: 1.5em”>- font size: 1.5em</span><br> <font … Read more