Jump to content











Photo
- - - - -

[WB 080 - Win7PE_SE] - How to add fonts to your build


  • Please log in to reply
35 replies to this topic

#1 Aeolis

Aeolis

    Frequent Member

  • .script developer
  • 145 posts
  • Location:Rio de Janeiro
  • Interests:I am just trying to learn and help.
  •  
    Brazil

Posted 29 July 2011 - 08:00 PM

Hello folks,

I have successfully added fonts to my build through Build > 1 - Copy Files > Copy Custom Folder and inside the custom folder I added a few fonts inside a folder with the structure Win7PE_SE\Windows\fonts this way the new fonts get copied in the right boot.win folder.

But, after that when running the Win7PE_SE DVD the new fonts are not available to the running applications, for instance, when I run PotPlayer inside the booted Win7PE_SE DVD PotPlayer can't see the Arial font I have added to the build. I think Maybe I have to copy the fonts files AND register this new fonts to the Win7PE_SE registry too, so they will be available to the applications

I would like some help here. Any help would be appreciated. Thank you for your attention.

See you later,

Aeolis

Edited by Aeolis, 29 July 2011 - 08:02 PM.


#2 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7,771 posts

Posted 29 July 2011 - 09:42 PM

Yes, adding more fonts is also on my list of things to fix.

There are just too many programs complaining or being mostly unreadable.

We used to have already a good list of essential fonts for PE1. Wonder why that was never used. :(


;)

#3 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1,291 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 30 July 2011 - 02:56 AM

Hello folks,

I have successfully added fonts to my build through Build > 1 - Copy Files > Copy Custom Folder and inside the custom folder I added a few fonts inside a folder with the structure Win7PE_SE\Windows\fonts this way the new fonts get copied in the right boot.win folder.

:ranting2:
I am confused, since there is a check box for fonts on that script, and it copies ALL the boot.wim fonts or a subset - LOOK IN THE SCRIPT

But, after that when running the Win7PE_SE DVD the new fonts are not available to the running applications, for instance, when I run PotPlayer inside the booted Win7PE_SE DVD PotPlayer can't see the Arial font I have added to the build. I think Maybe I have to copy the fonts files AND register this new fonts to the Win7PE_SE registry too, so they will be available to the applications

I'm not familiar with the application...Try wordpad or something else...

Also, are you sure they are in the WIM? (i.e. in the X: disks area?

#4 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7,771 posts

Posted 30 July 2011 - 10:49 AM

:ranting2:
I am confused, since there is a check box for fonts on that script, and it copies ALL the boot.wim fonts or a subset - LOOK IN THE SCRIPT

If by that script, you're talking about the 1 - copy files.script. Then i can tell you, i tryed that option. Doesn't make that much of a difference, if at all. Sorry has been a while.


:white_flag:

PS: Had a peak at the code in the 1 - copy files.script. Can't see how any difference should ever happen depending on selecting the the additional fonts or not.


Run,%ScriptFile%,AddFont

If,%AddFonts_CheckBox%,equal,false,run,%ScriptFile%,StandardFonts

[AddFont]

FileCopy,"%bw%\Fonts\*.*","%tw%\Fonts\"



[StandardFonts]

ReqBWin,Fonts\8514fix.fon

ReqBWin,Fonts\8514fixr.fon

ReqBWin,Fonts\8514oem.fon

ReqBWin,Fonts\8514oemr.fon

ReqBWin,Fonts\8514sys.fon

ReqBWin,Fonts\8514sysr.fon

.

.

.



#5 Aeolis

Aeolis

    Frequent Member

  • .script developer
  • 145 posts
  • Location:Rio de Janeiro
  • Interests:I am just trying to learn and help.
  •  
    Brazil

Posted 30 July 2011 - 02:42 PM

Hello folks,

@sbaeder: I have checked it again and the "ARIAL.TTF" font is in the RAM disk "X" at Windows\fonts\ with all the other fonts. I have tried WordPad and it can see all the other fonts, but the "ARIAL.TTF".

@sbaeder and MedEvil: I think new/custom fonts must be registered somewhere else to be available to all applications, so WordPad (and other applications) can see it. I am here to help and I would like to test anything you can suggest me.

See you later,

Aeolis

#6 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1,291 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 30 July 2011 - 04:37 PM

Hello folks,

@sbaeder: I have checked it again and the "ARIAL.TTF" font is in the RAM disk "X" at Windows\fonts\ with all the other fonts. I have tried WordPad and it can see all the other fonts, but the "ARIAL.TTF".

@sbaeder and MedEvil: I think new/custom fonts must be registered somewhere else to be available to all applications, so WordPad (and other applications) can see it. I am here to help and I would like to test anything you can suggest me.

See you later,

Aeolis

Yes, it looks like there are registry entries from "installing" a font. You could go into the PE, and go to the font directory, and "install" (use right-mouse/context menu and you should see install...Then use regedit to export the registry...

OR

I found a link to this executable - written in C http://marshwiggle.net/regfont/

Seems it would be easy enough to have a small script that took this, and ran it on all the fonts in the font directory (or is you knew which fonts you wanted to add...

Good luck!

#7 Aeolis

Aeolis

    Frequent Member

  • .script developer
  • 145 posts
  • Location:Rio de Janeiro
  • Interests:I am just trying to learn and help.
  •  
    Brazil

Posted 30 July 2011 - 05:49 PM

Hello folks,

@sbaeder: Here is the place where the fonts are stored:

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

I have tried the right-click add font method (on Win7PE_SE font directory at RAM disk X), but it doesn't work (there was no option to "install" font). So I manually added the registry entry using the "Custom Font.reg" file created by me with the script below:

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts]
"Arial (TrueType)"="arial.ttf"

It doesn't work too. After I have added the registry entry WordPad and other applications still could not see the new font. Maybe I have to load this registry entry during boot time, not after boot time, so it would be available from the "beginning" to every font aware application. I would like some help here. Thank you for your attention.

See you later,

Aeolis

Edited by Aeolis, 30 July 2011 - 05:49 PM.


#8 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7,771 posts

Posted 30 July 2011 - 06:32 PM

Another problem could be that you didn't register the font in the right order.
We used to have trouble with fonts in PE1 until we discovered, that some fonts needed to be registered in the right order to work flawlessly.

btw. I get on some PE3 the error message, that Arial.ttf would not be a valid true type font.
Didn't had time yet to check. But you could try, if things work better for you, with Arial.ttf from Install.wim.

:whistling:

#9 Aeolis

Aeolis

    Frequent Member

  • .script developer
  • 145 posts
  • Location:Rio de Janeiro
  • Interests:I am just trying to learn and help.
  •  
    Brazil

Posted 30 July 2011 - 07:49 PM

Hello folks,

@sbaeder and MedEvil: Thank you very much for your attention and help.

@sbaeder: I tried the regfont software that you suggested. Well, it works, but it has to be run every time you boot the PE again because as far as i understand its functionality it rebuild the font cache with the new fonts information. And It seems that Windows will rebuild it again and again on every boot. I will test it further.

Any feedback will be really appreciated.

See you later,

Aeolis

P.S.: Just an idea: Maybe if I add the registry line I wrote on previous post before the PE build the font cache during boot time it will work.

Edited by Aeolis, 30 July 2011 - 07:52 PM.


#10 Aeolis

Aeolis

    Frequent Member

  • .script developer
  • 145 posts
  • Location:Rio de Janeiro
  • Interests:I am just trying to learn and help.
  •  
    Brazil

Posted 30 July 2011 - 08:04 PM

Hello folks,

I would like to test my previous idea, but I need to add the following registry entry to my PE build:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts]
"Arial (TrueType)"="arial.ttf"

It must be added during boot time before PE builds its font cache. Could you help me on achieving it? How do I write it to PE registry? Where in WinBuilder do I add the script to do that?

Any help would be really helpful. Thank you for your attention.

See you later,

Aeolis

#11 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7,771 posts

Posted 30 July 2011 - 08:05 PM

Well, it works, but it has to be run every time you boot the PE again because as far as i understand its functionality it rebuild the font cache with the new fonts information. And It seems that Windows will rebuild it again and again on every boot.


I think you might misunderstood something about PE. Nothing, alsolutely nothing get's saved back to the registry in a PE.
Once you reboot the computer with your PE, it will as virgin as it was before.

So, if you want to make a change, that will be there on every boot, you will need to integrate that change during the build process.

:whistling:

#12 Aeolis

Aeolis

    Frequent Member

  • .script developer
  • 145 posts
  • Location:Rio de Janeiro
  • Interests:I am just trying to learn and help.
  •  
    Brazil

Posted 30 July 2011 - 08:25 PM

I think you might misunderstood something about PE. Nothing, alsolutely nothing get's saved back to the registry in a PE.
Once you reboot the computer with your PE, it will as virgin as it was before.

So, if you want to make a change, that will be there on every boot, you will need to integrate that change during the build process.

:whistling:


I understand what you say MedEvil and I have understood that PE will not store its changes to registry. That is why I need help modifing its registry entry during the build process like I told in the above post. Could you help with that, please?

Thank you for your attention.

See you later,

Aeolis

#13 PaPeuser

PaPeuser

    Silver Member

  • Advanced user
  • 787 posts
  •  
    United States

Posted 30 July 2011 - 09:05 PM

Hello

In Copy Files script,, there is a option to Add Addition Fonts
Have you tried this???

#14 Aeolis

Aeolis

    Frequent Member

  • .script developer
  • 145 posts
  • Location:Rio de Janeiro
  • Interests:I am just trying to learn and help.
  •  
    Brazil

Posted 30 July 2011 - 09:09 PM

Hello

In Copy Files script,, there is a option to Add Addition Fonts
Have you tried this???


Hello folks,

@PaPeuser: As MedEvil stated earlier in this post this option (Add Addition Fonts) is not working.

I have managed to make it work. I had an old build ready and tried to use the Utils > RegEdit > Edit Hives option. So, I added the [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts] "Arial (TrueType)"="arial.ttf" registry entry and booted the new edited image. Everything was fine and "Arial.ttf" was there for all "font aware" applications. I would like to have an easier method to do that, so, I will try to create a script to make it during the build process. I would like to know how to add a registry entry during the build process and where I should put the script containing it? Could you help me?

Thank you for your attention.

See you later,

Aeolis

Edited by Aeolis, 30 July 2011 - 09:16 PM.


#15 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1,291 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 30 July 2011 - 09:14 PM

Hello folks,

@sbaeder and MedEvil: Thank you very much for your attention and help.

@sbaeder: I tried the regfont software that you suggested. Well, it works, but it has to be run every time you boot the PE again because as far as i understand its functionality it rebuild the font cache with the new fonts information. And It seems that Windows will rebuild it again and again on every boot. I will test it further.

Any feedback will be really appreciated.

See you later,

Aeolis

P.S.: Just an idea: Maybe if I add the registry line I wrote on previous post before the PE build the font cache during boot time it will work.


What you need (and I am writing :whistling: is a simple script to do this as a postConfig...i.e. it runs fast, so just automate the running of it!

Wait a few more minutes for me to finish and test!

#16 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1,291 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 30 July 2011 - 09:16 PM

I understand what you say MedEvil and I have understood that PE will not store its changes to registry. That is why I need help modifing its registry entry during the build process like I told in the above post. Could you help with that, please?

Thank you for your attention.

See you later,

Aeolis


For all of this, go to the tutorials for script writers and start plowing into how scripts work and the functionality to mount a hive, and write to a registry...

BUT as I said, much easier to AddPostConfig!... :whistling:

#17 PaPeuser

PaPeuser

    Silver Member

  • Advanced user
  • 787 posts
  •  
    United States

Posted 30 July 2011 - 09:22 PM

Well here is another dumb idea...

I have found some things work better with a full file copy.. :whistling:

#18 Aeolis

Aeolis

    Frequent Member

  • .script developer
  • 145 posts
  • Location:Rio de Janeiro
  • Interests:I am just trying to learn and help.
  •  
    Brazil

Posted 30 July 2011 - 09:23 PM

For all of this, go to the tutorials for script writers and start plowing into how scripts work and the functionality to mount a hive, and write to a registry...

BUT as I said, much easier to AddPostConfig!... :whistling:


Hello folks,

@sbaeder: Thank you for all your help. I am eagerly waiting you to finish the script you mentioned before. Really thank you very much!

See you later,

Aeolis

#19 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1,291 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 30 July 2011 - 09:35 PM

Well here is another dumb idea...

I have found some things work better with a full file copy.. :whistling:

Yes, but that still doesn't copy over all the fonts - and the initialization copies the initial registry, which just has the potential fonts from the boot.wim...

To get more than "all" the boot.wim fonts, they have to be "registered"...So either add to registry at build or use some other way to add at run time

#20 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1,291 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 30 July 2011 - 09:37 PM

Hello folks,

@sbaeder: Thank you for all your help. I am eagerly waiting you to finish the script you mentioned before. Really thank you very much!

See you later,

Aeolis

It really is a TRIVIAL script...

pack the exe into the script, use the template that unpacks it, and modify the AddShortCut to be an AddPostConfig to run the program with the right parameters.

It is building now...

#21 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7,771 posts

Posted 30 July 2011 - 10:17 PM

Aeolis, you can try this code.
Just fill in the missing data in the main section. :whistling:

[main]

Title=

Type=Script

Level=4

Description=

Selected=True

Author=

Version=1

Date=2011.07.31

Mandatory=False

Download_Level=1

NoWarning=False



[process]

hive_load,HKU

RegWrite,HKLM,0x1,"%Reg%\Microsoft\Windows NT\CurrentVersion\Fonts","Arial (TrueType)","arial.ttf"

hive_unload,HKU


:whistling:

#22 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1,291 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 30 July 2011 - 11:23 PM

This is Exactly what you need to do for one or two fonts...But the regfont program is pretty trivial as well...

Here is script - consider this a beta...would be nicer to have this have a holding area or other way to include the copy of the fonts as well...

For NOW, just make sure the fonts get into windows\fonts.

Scott
EDIT - added ability to also copy fonts - script updated to v2 - patched v2 - see below

#23 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7,771 posts

Posted 31 July 2011 - 12:24 AM

Did anyone actually had a look, at the fonts Win7PE_SE includes?
Absolutely ridiculous assortment. Most fonts are for languages, i can't even identify, while basic fonts like arial are missing.

Would really like to know the script develoipers reason for doing so.

:whistling:

#24 Aeolis

Aeolis

    Frequent Member

  • .script developer
  • 145 posts
  • Location:Rio de Janeiro
  • Interests:I am just trying to learn and help.
  •  
    Brazil

Posted 31 July 2011 - 12:37 PM

Hello folks,

Thank you all for your help and thank you for the script. It's great. I have a small doubt: is there a specific place to put the regfont script? I have put it inside the "Build" scripts folder (Projects\Win7PE_SE\Build), is it ok?

See you later,

Aeolis

P.S.: Due to the great usefulness of this script I think it should be included in the main distribution of Win7PE_SE builder. Just my two cents.

Edited by Aeolis, 31 July 2011 - 12:39 PM.


#25 Michael*

Michael*

    Frequent Member

  • Advanced user
  • 210 posts
  •  
    United States

Posted 31 July 2011 - 06:21 PM

The script Level=4 so it needs to be in the folder with scripts of the same level. Examine the scripts in that folder with notepad or something. The level should stated in the top portion of the script. No sure off the top of my head. Level 5 is for Apps. Doesn't go there! If they are also Level=4, you've found the right place to drop the script.

I have put it inside the "Build" scripts folder (Projects\Win7PE_SE\Build), is it ok?

Aeolis


Edited by Michael*, 31 July 2011 - 06:23 PM.