Skip to content

Commit 2401398

Browse files
Merge pull request #236 from AnEnglishmanInNorway/nolocalfonts
Setting IGNORELOCALFONTS in the environment will do that.
2 parents 3d692be + adcffa5 commit 2401398

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

fontHandling.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ def findAndRegisterFonts(configSection, appDataDir, albumBaseFolder, cewe_folder
2020
if cewe_folder:
2121
fontDirs.append(CeweInfo.getCeweFontsFolder(cewe_folder))
2222

23-
# if a user has installed fonts locally on his machine, then we need to look there as well
24-
localFontFolder = localfont_dir()
25-
if os.path.exists(localFontFolder):
26-
fontDirs.append(str(localFontFolder))
23+
# If a user has installed fonts locally on his machine, then we look there as well
24+
# This behaviour can be inhibited with the presence of an environment variable to
25+
# make the local run more like what will happen when it is run by the github check-in
26+
# workflow
27+
if os.getenv("IGNORELOCALFONTS") is None:
28+
localFontFolder = localfont_dir()
29+
if os.path.exists(localFontFolder):
30+
fontDirs.append(str(localFontFolder))
2731

2832
try:
2933
searchlocations = (albumBaseFolder, os.path.curdir, os.path.dirname(os.path.realpath(__file__)))

runAllTests.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
import os
12
import pytest
3+
os.environ['IGNORELOCALFONTS'] = "1"
24
pytest.main(['-x', '--capture=tee-sys', '.', ''])

0 commit comments

Comments
 (0)