Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Installing Fonts (Temporarly)?

- - - - -

  • Please log in to reply
2 replies to this topic

#1
pepipo

pepipo
  • Member
  • 9 posts
  • Joined 27-June 04
I want to install fonts with a batch file without having to restart window and i would like to have two possibilities: a normal installation and a temporarly installation.
because i often have to install quickly some fonts for a specific project, so i would like to have a fonts folder in every of my projects folders and a simple batch script that would do the installation. i don't want to install a typemanager.
i have a solution yet, but it could probably be better - i'm not a batch scripting professional...


for a temporarly font installation i use this batch-script:

::----------------------------------
FOR /F "delims=;" %%a IN ('Dir .\Fonts /B /A-D-H-S /S') DO CMDOW /RUN /HID fontview %%a
::----------------------------------

the script opens every font in every subfolder with windows-fontview. i used "cmdow"-tool (http://www.commandline.co.uk/cmdow/) to hide the fontview window. if you open a font with fontview, the font is loaded into memory and you can use it in every application.
i don't like this solution very much, because for every font i open an own instance of fontview and i don't think that's very memory-efficient...
somebody has a better idea???

for temporarly deinstallation i just taskkill fontview:

::-----------------------------------
taskkill.exe /F /IM fontview.exe
::-----------------------------------


for a permanent font installation i use this batch-script:

::-----------------------------------
FOR /F "delims=;" %%a IN ('Dir .\Fonts /B /A-D-H-S /S') DO COPY "%%a" "%WINDIR%\Fonts"
::-----------------------------------

i just copy all fonts to the windows fonts directory.
the negative: you have to do a restart before you can use these fonts, because their have some registry entries to be done.(http://www.jsiinc.co...0500/rh0527.htm)
i would like to do the registry entry myself after copying the fonts(so i assume that i don't need to restart?!), but i don't know how to get the font-name. the font name is not the font-file-name.
for example:
font-name: "Bitstream Cyberbit (TrueType)"
font-file-name:"CYBERBIT.TTF"
(and this batch don't work for postscript-fonts, but that's ok for me)

If somebody has a good idea, you can make me happy!!! :)


How to remove advertisement from MSFN

#2
kyuuzo

kyuuzo

    Junior

  • Member
  • Pip
  • 64 posts
  • Joined 26-August 04
i use this registry key on my unattended disc, the fonts are in my windows folder (not in fonts) before adding these keys

;add fonts from windows folder
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts]
"Silkscreen (TrueType)"="SLKSCR.TTF"
"Silkscreen Extended (TrueType)"="SLKSCRE.TTF"

#3
pepipo

pepipo
  • Member
  • 9 posts
  • Joined 27-June 04
thanks but that doesn't help because i don't want to make a reg-file with all the keys in it. it's too much work.

i found out an interesting thing. when i open the fonts in my batch file with fontview and taskkill fontview afterwards, the fonts are still in memory.
but i don't know how long windows xp keeps the fonts in memory, perhaps until you do a restart?
that's the batch for the temporary installation. for me it works at the moment (and no need for CMDOW):

::------------------------------
FOR /F "delims=;" %%a IN ('Dir .\Fonts /B /A-D-H-S /S') DO Start /MIN fontview %%a
taskkill.exe /F /IM fontview.exe
::------------------------------


for the permanent installation it seems that windows does the registry keys itself. so just copying is enough.
i just have sometimes a problem to uninstall the fonts afterwards. even with "DEL /F " i can't delete/access installed fonts anymore. probably this happens when they are in use by another application.
so their are still some open questions...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users