DMDX Help.


Default Font Size Keyword

<DefaultFontSize N>
<dfs N>


    Switch and parameter to override the default font point size derived from the first font spec. found in the RTF item file.  The mechanisms involved with <DefaultFontSize> originated with earlier versions of DMastr that did not use RTF item files and had no other way of specifying font sizes.  With the advent of DMDX and it's RTF item file format the old font size specifications became rather difficult to implement because any use of font sizes in the RTF had to override the older mechanisms (otherwise why bother with an RTF file?)  So this is more of a legacy feature of DMDX than anything else, these days using the <DefaultFontMultipliers> is a much easier mechanism to use.

    The number of pixels DMDX uses to present a given a point size is always considerably larger than other programs are going to render it in and it's apparent size varies depending on the size of the screen one uses and how dense the pixels on that screen are as DMDX tries to present displays consistently across different display modes and to a lesser extent across machines.  The actual pixel height used to create the font DMDX uses is (font_point_size * 2 * font_multiplier * logpixelsy) / 72 where logpixelsy is the width of your display (in pixels) divided by 8, other programs are probably going to use 96 for logpixelsy regardless of display mode.  If we plug 1366 in there (a fairly common pixel display width in 2018) we can see that DMDX displays are going to be 1.78 times as large so a given 12 point display is probably going to be something like 20 or 22 point if any other program renders it.  That's the theory anyway, font synthesis is a quantum process in Windows' GDI CreateFont() and asking for a tiny bit bigger font with the font multipliers often results in no change and it's only when you cross some magical threshold that you get a larger font and measuring the resulting display it looks more like our 12 point font is rendered as a 23 point display.  Doing the same test (measuring the display on the screen) on another display that is 1920 pixels wide that yields a 2.5 factor a 12 point font is rendered at something more like 33 points and not the 30 our 2.5 factor would lead us to believe.  So bigger is the operational word, I suspect because when DMDX requests a font it uses a form of the CreateFont() call that asks for the font to match the character height instead of the cell height that other programs might ask for.

    There are several ways to change the displayed size of a font:
    The first option is WYSIWYG, change the font point size in the item file and it will change on the display, nice but if you are using really small or really big fonts this gets tedious to edit.
    Second option is to leave the font a comfortable size for viewing in the item file and override the point size with
<DefaultFontSize>. If all your text is not the same size you can override the default size by using the WYSIWYG features, less than optimal as WYS won't be WYG and you are limited to integer font sizes and conventional aspect ratios.
    Third option is to multiply the font size with
<DefaultFontMultipliers> and if all your text is not the same size multiply the size in individual frames with <FontMultipliers> or combine option one with this one and change the font point size in the item file in individual frames as the default font multipliers don't override font size, they multiply it. Additionally using these last two keywords you can synthesize unusual aspect ratio fonts.




DMDX Index.