mirror of
https://github.com/ValveSoftware/Proton.git
synced 2024-12-27 07:05:46 +03:00
proton: Install all available fonts to the prefix.
This requires commit "loader: Install all fonts provided by Proton in the registry." in Wine, otherwise font support will be broken.
This commit is contained in:
parent
4378ee718a
commit
77fd6c3b2d
25
proton
25
proton
@ -706,27 +706,14 @@ class CompatData:
|
|||||||
tracked_files.write(tracked_name + "\n")
|
tracked_files.write(tracked_name + "\n")
|
||||||
|
|
||||||
def create_fonts_symlinks(self):
|
def create_fonts_symlinks(self):
|
||||||
fontsmap = [
|
|
||||||
( g_proton.fonts_dir, "arial.ttf" ),
|
|
||||||
( g_proton.fonts_dir, "arialbd.ttf" ),
|
|
||||||
( g_proton.fonts_dir, "times.ttf" ),
|
|
||||||
( g_proton.fonts_dir, "cour.ttf" ),
|
|
||||||
( g_proton.fonts_dir, "courbd.ttf" ),
|
|
||||||
( g_proton.fonts_dir, "msyh.ttf" ),
|
|
||||||
( g_proton.fonts_dir, "simsun.ttc" ),
|
|
||||||
( g_proton.fonts_dir, "msgothic.ttc" ),
|
|
||||||
( g_proton.fonts_dir, "malgun.ttf" ),
|
|
||||||
( g_proton.fonts_dir, "micross.ttf" ),
|
|
||||||
( g_proton.fonts_dir, "nirmala.ttf" ),
|
|
||||||
|
|
||||||
( g_proton.wine_fonts_dir, "tahoma.ttf" ),
|
|
||||||
]
|
|
||||||
|
|
||||||
windowsfonts = self.prefix_dir + "/drive_c/windows/Fonts"
|
windowsfonts = self.prefix_dir + "/drive_c/windows/Fonts"
|
||||||
makedirs(windowsfonts)
|
makedirs(windowsfonts)
|
||||||
for p in fontsmap:
|
for fonts_dir in [g_proton.fonts_dir, g_proton.wine_fonts_dir]:
|
||||||
lname = os.path.join(windowsfonts, p[1])
|
for font in os.listdir(fonts_dir):
|
||||||
fname = os.path.join(p[0], p[1])
|
if not font.endswith('.ttf') and not font.endswith('.ttc'):
|
||||||
|
continue
|
||||||
|
lname = os.path.join(windowsfonts, font)
|
||||||
|
fname = os.path.join(fonts_dir, font)
|
||||||
if file_exists(lname, follow_symlinks=False):
|
if file_exists(lname, follow_symlinks=False):
|
||||||
if os.path.islink(lname):
|
if os.path.islink(lname):
|
||||||
os.remove(lname)
|
os.remove(lname)
|
||||||
|
Loading…
Reference in New Issue
Block a user