I'm using the script below to install fonts in Windows, but I wonder if there is a way to get the font name from the font. For example, the source file name is BebasNeue.otf
, but the name of the face is Bebas Neue (OpenType)
. How to get the face name for script to register correctly?
The script is recording the BebasNeue font name in the registry and would like it to save the face name in the Bebas Neue (OpenType) case.
@setlocal enableextensions enabledelayedexpansion
@echo off
echo instalando fontes....
for /f "delims=" %%f in ('dir /b \mulinfsv0005\Configs\fonts\') do (
set variable=%%f
set variable=!variable:~0,-4!
echo !variable!
xcopy \servidorOrigem\Configs\fonts\%%f c:\Windows\Fonts /y /q
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Fonts" /v !variable! /t REG_SZ /d %%f /f
)
endlocal
echo As fontes foram instaladas!
pause