mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #3641 from omnivore-app/fix/web-system-default-font
Fix issue where System Default font overrides the browser agent font settings
This commit is contained in:
commit
efcc9647a1
1 changed files with 11 additions and 1 deletions
|
|
@ -348,12 +348,22 @@ export function ArticleContainer(props: ArticleContainerProps): JSX.Element {
|
|||
return isJustified ? 'justify' : 'start'
|
||||
}
|
||||
|
||||
const appliedFont = (name: string | undefined | null) => {
|
||||
if (name === 'System Default') {
|
||||
return 'unset'
|
||||
}
|
||||
return name
|
||||
}
|
||||
|
||||
const styles = {
|
||||
fontSize,
|
||||
margin: props.margin ?? 360,
|
||||
maxWidthPercentage: maxWidthPercentageOverride ?? props.maxWidthPercentage,
|
||||
lineHeight: lineHeightOverride ?? props.lineHeight ?? 150,
|
||||
fontFamily: fontFamilyOverride ?? props.fontFamily ?? 'inter',
|
||||
fontFamily:
|
||||
appliedFont(fontFamilyOverride) ??
|
||||
appliedFont(props.fontFamily) ??
|
||||
'inter',
|
||||
readerFontColor:
|
||||
highContrastTextOverride != undefined
|
||||
? textColorValue(highContrastTextOverride)
|
||||
|
|
|
|||
Loading…
Reference in a new issue