mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
83ee722a2e
commit
1121081ad0
@ -6,7 +6,7 @@ from PyQt4.QtCore import Qt, QRectF, QString
|
|||||||
from PyQt4.QtGui import QFont, QColor, QPixmap, QGraphicsPixmapItem, \
|
from PyQt4.QtGui import QFont, QColor, QPixmap, QGraphicsPixmapItem, \
|
||||||
QGraphicsItem, QFontMetrics, QPen, QBrush, QGraphicsRectItem
|
QGraphicsItem, QFontMetrics, QPen, QBrush, QGraphicsRectItem
|
||||||
|
|
||||||
from calibre.ebooks.lrf.fonts import FONT_MAP
|
from calibre.ebooks.lrf.fonts import LIBERATION_FONT_MAP
|
||||||
from calibre.ebooks.BeautifulSoup import Tag
|
from calibre.ebooks.BeautifulSoup import Tag
|
||||||
from calibre.ebooks.hyphenate import hyphenate_word
|
from calibre.ebooks.hyphenate import hyphenate_word
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ class FontLoader(object):
|
|||||||
self.face_map = font_map
|
self.face_map = font_map
|
||||||
|
|
||||||
def font(self, text_style):
|
def font(self, text_style):
|
||||||
device_font = text_style.fontfacename in FONT_MAP
|
device_font = text_style.fontfacename in LIBERATION_FONT_MAP
|
||||||
try:
|
try:
|
||||||
if device_font:
|
if device_font:
|
||||||
face = self.font_map[text_style.fontfacename]
|
face = self.font_map[text_style.fontfacename]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user