fix: Replaced Bookerly with Noto Serif for licensing reasons (#1736)
## Summary Fixes #258. Bookerly is not licensed for use in CrossPoint. Switched to Google's open Noto Serif font. --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**NO**_
This commit is contained in:
@@ -149,15 +149,15 @@ except ImportError:
|
||||
|
||||
|
||||
_PROJECT_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
_BOOKERLY_FONT = os.path.join(
|
||||
_NOTOSERIF_FONT = os.path.join(
|
||||
_PROJECT_ROOT, "lib", "EpdFont", "builtinFonts", "source",
|
||||
"Bookerly", "Bookerly-Regular.ttf",
|
||||
"NotoSerif", "NotoSerif-Regular.ttf",
|
||||
)
|
||||
|
||||
|
||||
def _get_font(size=20):
|
||||
"""Get the Bookerly font at the requested size, with system fallbacks."""
|
||||
paths = [_BOOKERLY_FONT]
|
||||
"""Get the NotoSerif font at the requested size, with system fallbacks."""
|
||||
paths = [_NOTOSERIF_FONT]
|
||||
for path in paths:
|
||||
try:
|
||||
return ImageFont.truetype(path, size)
|
||||
|
||||
Reference in New Issue
Block a user