mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
MOBI Output: Map a larger set of font names to sans-serif/monospace font in the MOBI file
This commit is contained in:
parent
29414b0593
commit
52f1d7400d
@ -367,9 +367,11 @@ class MobiMLizer(object):
|
|||||||
istate.fgcolor = style['color']
|
istate.fgcolor = style['color']
|
||||||
istate.strikethrough = style['text-decoration'] == 'line-through'
|
istate.strikethrough = style['text-decoration'] == 'line-through'
|
||||||
istate.underline = style['text-decoration'] == 'underline'
|
istate.underline = style['text-decoration'] == 'underline'
|
||||||
if 'monospace' in style['font-family']:
|
ff = style['font-family'].lower() if style['font-family'] else ''
|
||||||
|
if 'monospace' in ff or 'courier' in ff:
|
||||||
istate.family = 'monospace'
|
istate.family = 'monospace'
|
||||||
elif 'sans-serif' in style['font-family']:
|
elif ('sans-serif' in ff or 'sansserif' in ff or 'verdana' in ff or
|
||||||
|
'arial' in ff or 'helvetica' in ff):
|
||||||
istate.family = 'sans-serif'
|
istate.family = 'sans-serif'
|
||||||
else:
|
else:
|
||||||
istate.family = 'serif'
|
istate.family = 'serif'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user