Skip to content

Commit

Permalink
Extend font setting to use custom fonts (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
diwako authored Oct 5, 2024
1 parent f2a7d9f commit 9dbc887
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 28 deletions.
24 changes: 9 additions & 15 deletions addons/main/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,14 @@ GVAR(inFeatureCamera) = false;

private _curCat = localize "STR_dui_cat_general";

GVAR(availableFonts) = [
"PuristaBold",
"PuristaLight",
"PuristaMedium",
"PuristaSemibold",
"RobotoCondensed",
"RobotoCondensedBold",
"RobotoCondensedLight",
"EtelkaMonospacePro",
// "EtelkaMonospaceProBold",
// "EtelkaNarrowMediumPro",
"LCD14"
// "TahomaB"
];
// Blacklisted fonts
GVAR(availableFonts) = '!(configName _x in [
"EtelkaMonospaceProBold",
"EtelkaNarrowMediumPro",
"TahomaB",
"PixelSplitterBold"
])' configClasses (configFile >> "CfgFontFamilies") apply {configName _x};
private _fontIndex = GVAR(availableFonts) findIf {_x isEqualTo "RobotoCondensed"};

[
"diwako_dui_font"
Expand All @@ -32,7 +26,7 @@ GVAR(availableFonts) = [
,[
GVAR(availableFonts),
GVAR(availableFonts),
4
_fontIndex
]
,false
,{
Expand Down
14 changes: 1 addition & 13 deletions addons/main/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,7 @@
<Turkish>Font</Turkish>
</Key>
<Key ID="STR_dui_font_desc">
<English>Which font should be used?</English>
<Chinesesimp>使用哪种字体</Chinesesimp>
<Chinese>使用哪種字體</Chinese>
<Czech>Který font by se měl použít.</Czech>
<French>Quel police de charactère doit être utilisé?</French>
<German>Welche Schriftart soll verwendet werden?</German>
<Korean>사용하는 폰트를 설정합니다.</Korean>
<Japanese>使用するフォントを設定します。</Japanese>
<Polish>Który font użyć?</Polish>
<Portuguese>Qual fonte será usada?</Portuguese>
<Spanish>¿Que fuente debe ser usada?</Spanish>
<Russian>Какой шрифт следует использовать?</Russian>
<Turkish>Kullanılacak font</Turkish>
<English>Which font should be used? Warning custom fonts might cause issues!</English>
</Key>
<Key ID="STR_dui_icon">
<English>Icon Style</English>
Expand Down

0 comments on commit 9dbc887

Please sign in to comment.