Skip to content

Commit

Permalink
Merge pull request #330 from cblanken/language-default-fonts
Browse files Browse the repository at this point in the history
fix: language default fonts
  • Loading branch information
simjanos-dev authored Aug 20, 2024
2 parents 6094667 + 560cb01 commit 9215ad2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions database/seeders/FontTypeSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,20 @@ public function run()
{
// Noto sans JP
$notoSansJpLanguages = [
'Croatian',
'Danish',
'Czech',
'Dutch',
'English',
'Finnish',
'French',
'German',
'Greek',
'Italian',
'Japanese',
'Korean',
'Latin',
'Macedonian',
'Norwegian',
'Portuguese',
'Romanian',
'Russian',
'Slovenian',
'Spanish',
'Swedish',
'Thai',
Expand Down Expand Up @@ -77,22 +72,27 @@ public function run()
}

// OpenSans
$poltawskiNowLanguages = [
$openSansLanguages = [
'Croatian',
'Czech',
'Greek',
'Macedonian',
'Polish',
'Slovenian',
];

$fontType = FontType
::where('filename', 'DefaultOpenSans.ttf')
->first();

if ($fontType) {
$fontType->languages = json_encode($poltawskiNowLanguages);
$fontType->languages = json_encode($openSansLanguages);
$fontType->save();
} else {
$fontType = new FontType();
$fontType->name = 'OpenSans';
$fontType->filename = 'DefaultOpenSans.ttf';
$fontType->languages = json_encode($poltawskiNowLanguages);
$fontType->languages = json_encode($openSansLanguages);
$fontType->default = true;
$fontType->save();
}
Expand Down

0 comments on commit 9215ad2

Please sign in to comment.