Skip to content

Commit

Permalink
feat: Add din-alternate-bold (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhea-so committed Apr 29, 2024
2 parents 4a92722 + 15400a8 commit 94c9cce
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.4.39",
"version": "0.4.40",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
Binary file added web/public/fonts/din-alternate-bold.ttf
Binary file not shown.
5 changes: 2 additions & 3 deletions web/src/fonts/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
enum Font {
Digital7 = 'digital-7',
DINAlternateBold = 'din-alternate-bold',
}

// Load all fonts from the fonts public/fonts folder
Object.values(Font).forEach((font) =>
new FontFace(font, `url(fonts/${font}.ttf)`).load().then((loadedFont) => document.fonts.add(loadedFont))
);
Object.values(Font).forEach((font) => new FontFace(font, `url(fonts/${font}.ttf)`).load().then((loadedFont) => document.fonts.add(loadedFont)));

export default Font;
2 changes: 1 addition & 1 deletion web/src/themes/03_ONE_LINE/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const ONE_LINE_OPTIONS: ThemeOption[] = [
{ key: 'FONT_STYLE', type: String, default: 'normal', description: 'normal or italic' },
{ key: 'FONT_WEIGHT', type: Number, default: 300, description: '100 - 900' },
{ key: 'FONT_SIZE', type: Number, default: 70, description: 'px' },
{ key: 'FONT_FAMILY', type: String, default: 'Barlow', description: 'ex. digital-7, Barlow, Arial, sans-serif' },
{ key: 'FONT_FAMILY', type: String, default: 'Barlow', description: 'ex. din-alternate-bold, digital-7, Barlow, Arial, sans-serif' },
{ key: 'TOP_LABEL', type: String, default: '', description: 'ex. @username' },
];

Expand Down
2 changes: 1 addition & 1 deletion web/src/themes/04_TWO_LINE/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const TWO_LINE_OPTIONS: ThemeOption[] = [
{ key: 'FONT_STYLE', type: String, default: 'normal', description: 'normal or italic' },
{ key: 'FONT_WEIGHT', type: Number, default: 300, description: '100 - 900' },
{ key: 'FONT_SIZE', type: Number, default: 70, description: 'px' },
{ key: 'FONT_FAMILY', type: String, default: 'Barlow', description: 'ex. digital-7, Barlow, Arial, sans-serif' },
{ key: 'FONT_FAMILY', type: String, default: 'Barlow', description: 'ex. din-alternate-bold, digital-7, Barlow, Arial, sans-serif' },
{ key: 'TOP_LABEL', type: String, default: '', description: 'ex. @username' },
];

Expand Down
2 changes: 1 addition & 1 deletion web/src/themes/09_MONITOR/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const MONITOR_OPTIONS: ThemeOption[] = [
{ key: 'FONT_STYLE', type: String, default: 'normal', description: 'normal or italic' },
{ key: 'FONT_WEIGHT', type: Number, default: 500, description: '100 - 900' },
{ key: 'FONT_SIZE', type: Number, default: 70, description: 'px' },
{ key: 'FONT_FAMILY', type: String, default: 'Barlow', description: 'ex. digital-7, Barlow, Arial, sans-serif' },
{ key: 'FONT_FAMILY', type: String, default: 'Barlow', description: 'ex. din-alternate-bold, digital-7, Barlow, Arial, sans-serif' },
];

const MONITOR_FUNC: ThemeFunc = (photo: Photo, input: ThemeOptionInput, store: Store) => {
Expand Down
2 changes: 1 addition & 1 deletion web/src/themes/10_LIGHTROOM/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const LIGHTROOM_OPTIONS: ThemeOption[] = [
{ key: 'FONT_STYLE', type: String, default: 'normal', description: 'normal or italic' },
{ key: 'FONT_WEIGHT', type: Number, default: 300, description: '100 - 900' },
{ key: 'FONT_SIZE', type: Number, default: 50, description: 'px' },
{ key: 'FONT_FAMILY', type: String, default: 'Barlow', description: 'ex. digital-7, Barlow, Arial, sans-serif' },
{ key: 'FONT_FAMILY', type: String, default: 'Barlow', description: 'ex. din-alternate-bold, digital-7, Barlow, Arial, sans-serif' },
];

const LIGHTROOM_FUNC: ThemeFunc = (photo: Photo, input: ThemeOptionInput, store: Store) => {
Expand Down
2 changes: 1 addition & 1 deletion web/src/themes/11_CUSTOM_ONE_LINE/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const CUSTOM_ONE_LINE_OPTIONS: ThemeOption[] = [
{ key: 'FONT_STYLE', type: String, default: 'normal', description: 'normal or italic' },
{ key: 'FONT_WEIGHT', type: Number, default: 300, description: '100 - 900' },
{ key: 'FONT_SIZE', type: Number, default: 70, description: 'px' },
{ key: 'FONT_FAMILY', type: String, default: 'Barlow', description: 'ex. digital-7, Barlow, Arial, sans-serif' },
{ key: 'FONT_FAMILY', type: String, default: 'Barlow', description: 'ex. din-alternate-bold, digital-7, Barlow, Arial, sans-serif' },
];

const CUSTOM_ONE_LINE_FUNC: ThemeFunc = (photo: Photo, input: ThemeOptionInput, store: Store) => {
Expand Down
2 changes: 1 addition & 1 deletion web/src/themes/12_CUSTOM_TWO_LINE/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const CUSTOM_TWO_LINE_OPTIONS: ThemeOption[] = [
{ key: 'FONT_STYLE', type: String, default: 'normal', description: 'normal or italic' },
{ key: 'FONT_WEIGHT', type: Number, default: 300, description: '100 - 900' },
{ key: 'FONT_SIZE', type: Number, default: 70, description: 'px' },
{ key: 'FONT_FAMILY', type: String, default: 'Barlow', description: 'ex. digital-7, Barlow, Arial, sans-serif' },
{ key: 'FONT_FAMILY', type: String, default: 'Barlow', description: 'ex. din-alternate-bold, digital-7, Barlow, Arial, sans-serif' },
];

const CUSTOM_TWO_LINE_FUNC: ThemeFunc = (photo: Photo, input: ThemeOptionInput, store: Store) => {
Expand Down

0 comments on commit 94c9cce

Please sign in to comment.