I'm trying to write a script to import a font in Wine, because I put the font in wine's c:\Windows\Fonts
, but Wine doesn't read it if I don't import from the reg file:
"Font Name"="Z:\path\to\my\wineprefix\c:\Windows\Fonts\file.ttf"
And I don't know how to change the /
to \
, using $(pwd)
or $PWD
. Does someone know how I can replace the slash with a backslash?
I have a trouble with echo and with the output file. In my bash script I have this
RUTA=""$( cd -P "$( dirname "$" )" && pwd )""
RUTAINVERSA=$(printf '%s\n' "${PWD//\//\\}")
Well I has try with the follows:
1 :
echo 'REGEDIT4
[HKEY_CURRENT_USER\\Software\\Wine\\Fonts\\External Fonts]
"Courier New"="'"Z:\\$RUTAINVERSA\\wine\\data\\dosdevices\\c:\\windows\\Fonts\\cour.ttf"'"
"Courier New Bold"="'"Z:\\$RUTAINVERSA\\wine\\data\\dosdevices\\c:\\windows\\Fonts\\courbd.ttf"'"' >> "$ARREGLOS/Fuentes.reg"
The result in the past are: c:\Windows\Fonts
, and I don't know what happened with the rest with \file.ttf
.
2 :
echo >> "$ARREGLOS/Fuentes.reg"
echo "[HKEY_CURRENT_USER\\Software\\Wine\\Fonts\\External Fonts]" >> "$ARREGLOS/Fuentes.reg"
echo "Courier New"="c:\\windows\\Fonts\\cour.ttf" >> "$ARREGLOS/Fuentes.reg"
echo "Courier New Bold"="c:\\windows\\Fonts\\courbd.ttf" >> "$ARREGLOS/Fuentes.reg"
The result are: Courier New c:windowsFontcour.tff Courier New Bold c:widowsFontscourbd.ttf
3 :
[HKEY_CURRENT_USER\\Software\\Wine\\Fonts\\External Fonts]
"Courier New"="'"c:\\\windows\\\Fonts\\\cour.ttf"'"
"Courier New Bold"="'"c:\\\windows\\\Fonts\\\courbd.ttf"'" ' >> "$ARREGLOS/Fuentes.reg"
and it's the same the first c:\windows\Fonts
, I don't know why the path are not full in the variable result.