Jump to content











Photo
* * * * * 1 votes

Issue with Fonts


  • Please log in to reply
10 replies to this topic

#1 beakmyn

beakmyn

    Newbie

  • .script developer
  • 22 posts

Posted 21 September 2006 - 02:09 PM

I'm working on a script to allow the inclusion of additional fonts and did some searching and came across this post, which has a good list of default fonts to include.
http://www.boot-land...?...post&p=2081
and this website:
http://graphicssoft....toverload_3.htm

Now in making this script I've discovered a possible bug in WinBuilder. When you add a font it's a two step process.
1. Expand the font file to the Fonts directory
2. Update the registry with the font info

In creating this script I noticed that there's a lot more registry keys then there are fonts in the registry, for a default build. This could possibly cause issues if a program looks to the registry for installed fonts only to find that the font file doesn't exist. I understand wanting to keep the iso size to a minimum and not include any extra fonts but then it would reason that we'd want to remove the registry entries for the ones that don't exist.

There are 3 keys were dealing with fonts in Windows

This key has something do with fonts but I haven't figured out what.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontMapper]

"ARIAL"			=dword:00000000

"COURIER"		=dword:00008800

"COURIER NEW"		=dword:00008000

"DEFAULT"		 ="0"

"FIXEDSYS"		=dword:00009000

"MS SANS SERIF"		=dword:00001000

"MS SERIF"		=dword:00005000

"SMALL FONTS"		=dword:00000800

"SYMBOL"		=dword:00004002

"SYMBOL1"		=dword:0000a002

"TIMES NEW ROMAN"	=dword:00004000

"WINGDINGS"		=dword:00000002

"WINGDINGS2"		=dword:00008002


These are the fonts that Windows thinks it has installed. And there a lot more then
that is in the list of essential fonts, so this registry folder could be trimmed of a few
unneccesary keys. Do I think it's a big deal if we leave them? No. But keep reading.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts]

"Roman (All res)"				="ROMAN.FON"

"Script (All res)"				="SCRIPT.FON"

"Modern (All res)"				="MODERN.FON"

"Small Fonts (VGA res)"				="SMALLE.FON"

"Arial (TrueType)"				="ARIAL.TTF"

"Arial Bold (TrueType)"				="ARIALBD.TTF"

"Arial Bold Italic (TrueType)"			="ARIALBI.TTF"

"Arial Italic (TrueType)"			="ARIALI.TTF"

"Courier New (TrueType)"			="COUR.TTF"

"Courier New Bold (TrueType)"			="COURBD.TTF"

"Courier New Bold Italic (TrueType)"		="COURBI.TTF"

"Courier New Italic (TrueType)"			="COURI.TTF"

"Lucida Console (TrueType)"			="LUCON.TTF"

"Lucida Sans Unicode (TrueType)"		="L_10646.TTF"

"Times New Roman (TrueType)"			="TIMES.TTF"

"Times New Roman Bold (TrueType)"		="TIMESBD.TTF"

"Times New Roman Bold Italic (TrueType)"	="TIMESBI.TTF"

"Times New Roman Italic (TrueType)"		="TIMESI.TTF"

"WingDings (TrueType)"				="WINGDING.TTF"

"Symbol (TrueType)"				="SYMBOL.TTF"

"Symbol 8,10,12,14,18,24 (VGA res)"		="SYMBOLE.FON"

"Verdana (TrueType)"				="verdana.TTF"

"Verdana Bold (TrueType)"			="verdanab.TTF"

"Verdana Italic (TrueType)"			="verdanai.TTF"

"Verdana Bold Italic (TrueType)"		="verdanaz.TTF"

"Arial Black (TrueType)"			="ariblk.TTF"

"Comic Sans MS (TrueType)"			="comic.TTF"

"Comic Sans MS Bold (TrueType)"			="comicbd.TTF"

"Impact (TrueType)"				="impact.TTF"

"Georgia (TrueType)"				="georgia.TTF"

"Georgia Bold (TrueType)"			="georgiab.TTF"

"Georgia Bold Italic (TrueType)"		="georgiaz.TTF"

"Georgia Italic (TrueType)"			="georgiai.TTF"

"Franklin Gothic Medium (TrueType)"		="Framd.TTF"

"Franklin Gothic Medium Italic (TrueType)"	="Framdit.TTF"

"Palatino Linotype (TrueType)"			="pala.TTF"

"Palatino Linotype Bold (TrueType)"		="palab.TTF"

"Palatino Linotype Bold Italic (TrueType)"	="palabi.TTF"

"Palatino Linotype Italic (TrueType)"		="palai.TTF"

"Tahoma Bold (TrueType)"			="tahomabd.TTF"

"Trebuchet MS (TrueType)"			="trebuc.TTF"

"Trebuchet MS Bold (TrueType)"			="trebucbd.TTF"

"Trebuchet MS Bold Italic (TrueType)"		="trebucbi.TTF"

"Trebuchet MS Italic (TrueType)"		="trebucit.TTF"

"Webdings (TrueType)"				="webdings.TTF"

"Estrangelo Edessa (TrueType)"			="estre.TTF"

"Gautami (TrueType)"				="gautami.TTF"

"Latha (TrueType)"				="latha.TTF"

"Mangal (TrueType)"				="mangal.TTF"

"Mv Boli (TrueType)"				="mvboli.TTF"

"Raavi (TrueType)"				="raavi.TTF"

"Shruti (TrueType)"				="shruti.TTF"

"Tunga (TrueType)"				="tunga.TTF"

"Sylfaen (TrueType)"				="sylfaen.TTF"

"WST_Czec (All res)"				="wst_czec.FON"

"WST_Engl (All res)"				="wst_engl.FON"

"WST_Fren (All res)"				="wst_fren.FON"

"WST_Germ (All res)"				="wst_germ.FON"

"WST_Ital (All res)"				="wst_ital.FON"

"WST_Span (All res)"				="wst_span.FON"

"WST_Swed (All res)"				="wst_swed.FON"

"Tahoma (TrueType)"				="TAHOMA.TTF"


Here is where I think we can get into trouble. This where Windows goes to find what font
can be substituted if the font above isn't found. This is the cause of weird fonts being displayed
in some programs because Windows defaults to a font(editmarlett )that doesn't look so pretty.
Also, this issue will become apparent when you try and internationalize the build.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]

"Arial CE,238"			[color=blue]="Arial,238"[/color]

"Arial CYR,204"			[color=blue]="Arial,204"[/color]

"Arial Greek,161"		[color=blue]="Arial,161"[/color]

"Arial TUR,162"			[color=blue]="Arial,162"[/color]

"Courier New CE,238"		[color=blue]="Courier New,238"[/color]

"Courier New CYR,204"		[color=blue]="Courier New,204"[/color]

"Courier New Greek,161"		[color=blue]="Courier New,161"[/color]

"Courier New TUR,162"		[color=blue]="Courier New,162"[/color]

"Helv"				[color=blue]="MS Sans Serif"[/color]

"Helvetica"			[color=blue]="Arial"[/color]

"MS Shell Dlg"			[color=blue]="Microsoft Sans Serif"[/color]

"MS Shell Dlg 2"		[color=blue]="Tahoma"[/color]

"Times"				[color=blue]="Times New Roman"[/color]

"Times New Roman CE,238"	[color=blue]="Times New Roman,238"[/color]

"Times New Roman CYR,204"	[color=blue]="Times New Roman,204"[/color]

"Times New Roman Greek,161"	[color=blue]="Times New Roman,161"[/color]

"Times New Roman TUR,162"	[color=blue]="Times New Roman,162"[/color]

"Tms Rmn"			[color=blue]="MS Serif"[/color]

I would say that bare minimum we install:
"ARIAL"
"COURIER"
"COURIER NEW"
"FIXEDSYS"
"MS SANS SERIF"
"MS SERIF"
"SMALL FONTS"
"SYMBOL"
"SYMBOL1"
"TIMES NEW ROMAN"
"WINGDINGS"
"WINGDINGS2"

fonts installed, then remove all except those entries from the Fonts Registry



There's a few ways to fix this.
1. In the Copy&Expand script, add all the currently listed fonts in the Fonts registry folder and copy them to the fonts folder
3. I'll make my additional fonts script to add those that are in the registry and are listed as essential by the above two links.

#2 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 21 September 2006 - 02:41 PM

Nice research work! :P

Now I understand the reason why the fonts didn't worked as supposed.

This issue exists because the hives are still derivated from bartPE, however the hive script can have these entries removed by default.

Adding these font files on copy&expand could be a solution but would also increase around 1,5~2Mb on the final ISO size..

It would likely be wiser to be added as a standalone script in order to be flexible and people choose to wether include more fonts or not.

Also looking at ReactOS fonts folder - they all seem to be less sized when compared to MS ones (each font is around 60Kb). Would there be a change of using some of these fonts instead?

Here's ROS fonts from their live distribution:
http://boot-land.net...opers/fonts.zip

:P

#3 beakmyn

beakmyn

    Newbie

  • .script developer
  • 22 posts

Posted 21 September 2006 - 02:57 PM

Nice research work! :P

Now I understand the reason why the fonts didn't worked as supposed.

This issue exists because the hives are still derivated from bartPE, however the hive script can have these entries removed by default.

Adding these font files on copy&expand could be a solution but would also increase around 1,5~2Mb on the final ISO size..

It would likely be wiser to be added as a standalone script in order to be flexible and people choose to wether include more fonts or not.

Also looking at ReactOS fonts folder - they all seem to be less sized when compared to MS ones (each font is around 60Kb). Would there be a change of using some of these fonts instead?

Here's ROS fonts from their live distribution:
http://boot-land.net...opers/fonts.zip

:P



That has some of fonts in the list from about.com website and some others. I think what we need to do is make sure we have at least the subsitutes that are listed and most of the about.com ones.

I'd like to see the 3 registry "hives/folders?" in ReactOS for the ones I listed.

There's definately room for improvement and some cleanup.

#4 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 21 September 2006 - 03:00 PM

The 'font mapper' entry is different depending on language (if you use autoLocalization.Script):
In one language the arial font may be called 'Sans', in the other one 'Helvetica'

The additional registry entries (w/o corresponding copied font) will be removed inside HoJoPE scripts.

Peter

#5 philon

philon

    Newbie

  • Advanced user
  • 19 posts

Posted 21 September 2006 - 07:16 PM

In my build made from XP Pro SP2 german with WB 0.50 bold letters are completely distorted.


See here.

Is this a font issue or a code table problem?

Is this a known problem? Any solution? Thanks for any help.

philon

#6 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 21 September 2006 - 07:34 PM

In my build made from XP Pro SP2 german with WB 0.50 bold letters are completely distorted.
See here.

Is this a font issue or a code table problem?

Is this a known problem? Any solution? Thanks for any help.

philon

I think you made PicoXP without the choice of either add arial or a user defined font to your build
[attachment=362:attachment]

BTW Maybe there is a different issue: What do you mean with 'Bold Letters'? Inside PicoXP there is no definition for them.

Peter

#7 philon

philon

    Newbie

  • Advanced user
  • 19 posts

Posted 21 September 2006 - 08:39 PM

BTW Maybe there is a different issue: What do you mean with 'Bold Letters'? Inside PicoXP there is no definition for them.
Peter


These are bold letters = characters.
I build the standard version not the pico one. Sorry for not mentioning it.

philon

#8 beakmyn

beakmyn

    Newbie

  • .script developer
  • 22 posts

Posted 21 September 2006 - 08:43 PM

In my build made from XP Pro SP2 german with WB 0.50 bold letters are completely distorted.
See here.

Is this a font issue or a code table problem?

Is this a known problem? Any solution? Thanks for any help.

philon


It appears that its using the Marlett font because it can't find a proper substitute. I'm working on a script to allow you to select the additional fonts you want to install, which should provide the proper substitutions and fix this issue.



The additional registry entries (w/o corresponding copied font) will be removed inside HoJoPE scripts.


Thanks for the fontmapper clarification. What is the HoJoPE script? I did a standard build then ran it in Qemu and that's where I got the registry entries. My question because I to see if this script is running and if it is why isn't deleting the registry entries as you say it should.

By default the only fonts that are in the fonts folder are:

ARIAL.TTF
MARLETT.TTF
VGA850.FON
VGA861.FON
VGAOEM.FON

This isn't enough fonts (I.E. not enough subsitutes) for the system to work under certain circumstances.
I.E. programs that use more then Arial, xoblite menu
You'll find that this shows up when marlett font gets used as the substitute font


Marlett is a special font made by Microsoft to enable the whole Windows interface to scale to different sizes. Windows 95 and later use Marlett to generate icons for maximize, minimize, close window, and many others, expanding and contracting them to fill the space allowed by the current interface settings. Marlett only exists as a TrueType font, Microsoft using that technology to perfect the bitmap images at each size.


http://www.microsoft...p;FNAME=Marlett
It also won't show up in a normal folder view of your Windows system, it's hidden.

It doesn't have standard letters and numbers, hence the issue. Anyway, there's a Beta version of my additional Fonts script Additional Fonts

It doesn't check/add registry entries yet as once I know what HoJoPe is I'll know if I should make this script do any needed registry modifications in Font substitutes and Fonts keys.

#9 philon

philon

    Newbie

  • Advanced user
  • 19 posts

Posted 22 September 2006 - 06:16 PM

@beakmyn

Thanks for your answer. You are completely right: It is a font issue. Adding the 19 fonts of your script solved the iproblem. :P
Now I'm going to check what subset of these 19 is really necessary. Have to "study" what is the best strategy (minimum number of trials) to find it out... :P

philon

#10 beakmyn

beakmyn

    Newbie

  • .script developer
  • 22 posts

Posted 22 September 2006 - 06:30 PM

@beakmyn

Thanks for your answer. You are completely right: It is a font issue. Adding the 19 fonts of your script solved the iproblem. :P
Now I'm going to check what subset of these 19 is really necessary. Have to "study" what is the best strategy (minimum number of trials) to find it out... :P

philon


When you you find out let me know and I'll modify the script to delete the un-needed registry and and I'll set the checkboxes.

I'll be working on some other scripts in the meantime.

#11 philon

philon

    Newbie

  • Advanced user
  • 19 posts

Posted 23 September 2006 - 11:46 AM

When you you find out let me know and I'll modify the script to delete the un-needed registry and and I'll set the checkboxes.


Found out that adding arialbd.ttf to the default fonts of WinBuilder Standard is sufficient to show all the pages correctly that were distorted without it. :P
This is valid for german XP Pro SP2 as source. :P

Btw. adding arialbi.ttf to the default fonts also made readable everything being distortd before but showed it in italic characters. The operating system evidentely looks for a replacement if the wanted font is not available.
:P
philon




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users