Skip to content

Commit

Permalink
load fonts from file if not available on system
Browse files Browse the repository at this point in the history
  • Loading branch information
revilovs committed Feb 28, 2024
1 parent 4f7d5f3 commit 471bdac
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions fth/fth-lang.sty
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,20 @@
% Fonts für die Sprachen *
% ========================
\RequirePackage{fontspec}
\newfontfamily{\greekfont}{SBL Greek}
\newfontfamily{\greekfontsf}{SBL Greek}
\newfontfamily{\hebrewfont}{SBL Hebrew}
\newfontfamily{\hebrewfontsf}{SBL Hebrew}

% Zunächst wird versucht, den Font über das System zu laden, andernfalls wird lokal nach einer passenden Datei gesucht (z.B. bei Overleaf nötig)
\IfFontExistsTF{SBL Greek}{
\newfontfamily{\greekfont}{SBL Greek}
\newfontfamily{\greekfontsf}{SBL Greek}
}{
\newfontfamily{\greekfont}{SBL_grk.ttf}
\newfontfamily{\greekfontsf}{SBL_grk.ttf}
}
\IfFontExistsTF{SBL Hebrew}{
\newfontfamily{\hebrewfont}{SBL Hebrew}
\newfontfamily{\hebrewfontsf}{SBL Hebrew}
}{
\newfontfamily{\hebrewfont}{SBL_Hbrw.ttf}
\newfontfamily{\hebrewfontsf}{SBL_Hbrw.ttf}
}

0 comments on commit 471bdac

Please sign in to comment.