Compartilhar via


Customizing the Browser Font Table (Windows CE 5.0)

Send Feedback

MSHTML fonts are based on HTML fonts in the size range of 1 through 7 points. These font sizes are mapped to an internal font table that contains 9 rows and 7 columns, and specifies font sizes measured in twips. A twip is one-twentieth of a point.

The font table is created in the HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\ScaleTable registry key as REG_BINARY when the browser is launched for the first time. The registry entries are loaded from the Project.reg file, which defines the registry settings for the Internet Explorer application.

Note   The registry value is created only for the Debug configuration.

The font table is formatted as 63 2-byte values in little endian format. To see the default values created in the registry, open the ie.reg file.located in %_WINCEROOT%\PUBLIC\IE\OAK\FILES folder.

The registry file contains the following default values for the font table:

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
"ScaleTable"=hex:
  78,00,a0,00,b4,00,c8,00,f0,00,40,01,e0,01,\
  8c,00,b4,00,c8,00,f0,00,40,01,90,01,58,02,\
  97,00,c8,00,f0,00,0f,01,68,01,e0,01,d0,02,\ 
  c8,00,f0,00,18,01,40,01,90,01,30,02,48,03,\
  f0,00,18,01,40,01,68,01,e0,01,80,02,c0,03,\
  40,01,68,01,90,01,b8,01,58,02,f8,02,60,04,\
  68,01,90,01,b8,01,e0,01,80,02,20,03,88,04,\
  90,01,b8,01,e0,01,08,02,a8,02,48,03,b0,04,\
  b8,01,e0,01,08,02,30,02,d0,02,70,03,d8,04

The registry values, when converted to twips, are as follows:

{

{ 120, 160, 180, 200, 240, 320, 480 },

{ 140, 180, 200, 240, 320, 400, 600 },

{ 151, 200, 240, 271, 360, 480, 720 },

{ 200, 240, 280, 320, 400, 560, 840 },

{ 240, 280, 320, 360, 480, 640, 960 },

{ 320, 360, 400, 440, 600, 760, 1120 },

{ 360, 400, 440, 480, 640, 800, 1160 },

{ 400, 440, 480, 520, 680, 840, 1200 },

{ 440, 480, 520, 560, 720, 880, 1240 }

};

Note   Rows 6 through 9 in the table are reserved for high-contrast accessibility modes and are not supported on Microsoft® Windows® CE.

Values in the row represent the font size and the values in columns 1 through 5 correspond to the browser scale. For example, if the default plain text is set to an HTML font size of 4 pt, the browser scalable sizes in twips are read from the fourth row in the font table.

{ 200, 240, 280, 320, 400, 560, 840 },

The following table shows the font to HTML size correlation for the default plain text style.

HTML Size Browser scale Font size
4 Smallest 200 twips (6 pt)
4 Smaller 240 twips (8 pt)
4 Medium 280 twips (9 pt)
4 Larger 320 twips (10 pt)
4 Largest 400 twips (12 pt)

For elements such as the <H1> tag, which has an HTML font size of 6 pt, scale to the sixth column of the font table. For <sub> (subscript) and <sup> (superscript) tags, the size decreases by 1 or 2 indexes in the font table. For example, for a HTML font size of 3 and a browser scale medium, subscript and superscript text will be mapped to font size of 160 twips.

To customize the font table, modify the registry values in the .reg file and rebuild the run-time image. The new values are loaded when the next the browser is launched.

Note   The registry key limits font sizes between 80 twips (4pt) and 2560 twips (128 pt).

For information about how to edit registry setting in a .reg file, see Modifying the Registry by Editing Project.reg

See Also

Internet Explorer MSHTML/DHTML API Application Development | Registry File

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.