This commit is contained in:
GRiker 2011-11-30 10:04:33 -07:00
commit 2a6101ccb7
3 changed files with 7 additions and 3 deletions

View File

@ -167,7 +167,7 @@ class ANDROID(USBMS):
'MB525', 'ANDROID2.3', 'SGH-I997', 'GT-I5800_CARD', 'MB612',
'GT-S5830_CARD', 'GT-S5570_CARD', 'MB870', 'MID7015A',
'ALPANDIGITAL', 'ANDROID_MID', 'VTAB1008', 'EMX51_BBG_ANDROI',
'UMS', '.K080', 'P990', 'LTE', 'MB853']
'UMS', '.K080', 'P990', 'LTE', 'MB853', 'GT-S5660_CARD']
WINDOWS_CARD_A_MEM = ['ANDROID_PHONE', 'GT-I9000_CARD', 'SGH-I897',
'FILE-STOR_GADGET', 'SGH-T959', 'SAMSUNG_ANDROID', 'GT-P1000_CARD',
'A70S', 'A101IT', '7', 'INCREDIBLE', 'A7EB', 'SGH-T849_CARD',

View File

@ -539,7 +539,8 @@ class Style(object):
'Return value in pts'
if base is None:
base = self.width
font = font or self.fontSize
if not font and font != 0:
font = self.fontSize
return unit_convert(value, base, font, self._profile.dpi)
def pt_to_px(self, value):

View File

@ -283,7 +283,10 @@ class CSSFlattener(object):
psize = fsize
elif 'font-size' in cssdict or tag == 'body':
fsize = self.fmap[font_size]
cssdict['font-size'] = "%0.5fem" % (fsize / psize)
try:
cssdict['font-size'] = "%0.5fem" % (fsize / psize)
except ZeroDivisionError:
cssdict['font-size'] = '%.1fpt'%fsize
psize = fsize
try: