fix/filtration #20
@@ -12,6 +12,7 @@ import type {
|
|||||||
FontshareFont,
|
FontshareFont,
|
||||||
GoogleFontItem,
|
GoogleFontItem,
|
||||||
UnifiedFont,
|
UnifiedFont,
|
||||||
|
UnifiedFontVariant,
|
||||||
} from '../../model/types';
|
} from '../../model/types';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -186,7 +187,7 @@ export function normalizeFontshareFont(apiFont: FontshareFont): UnifiedFont {
|
|||||||
const variants = apiFont.styles.map(style => {
|
const variants = apiFont.styles.map(style => {
|
||||||
const weightLabel = style.weight.label;
|
const weightLabel = style.weight.label;
|
||||||
const isItalic = style.is_italic;
|
const isItalic = style.is_italic;
|
||||||
return isItalic ? `${weightLabel}italic` : weightLabel;
|
return (isItalic ? `${weightLabel}italic` : weightLabel) as UnifiedFontVariant;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Map styles to URLs
|
// Map styles to URLs
|
||||||
|
|||||||
Reference in New Issue
Block a user