Fix minor flake8 issues in font patcher
This commit is contained in:
parent
d28003c973
commit
e89ce2c7db
|
@ -2,8 +2,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
|
||||||
import re
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -60,10 +58,14 @@ class FontPatcher(object):
|
||||||
except TypeError:
|
except TypeError:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if bbox[0] < target_bb[0]: target_bb[0] = bbox[0]
|
if bbox[0] < target_bb[0]:
|
||||||
if bbox[1] < target_bb[1]: target_bb[1] = bbox[1]
|
target_bb[0] = bbox[0]
|
||||||
if bbox[2] > target_bb[2]: target_bb[2] = bbox[2]
|
if bbox[1] < target_bb[1]:
|
||||||
if bbox[3] > target_bb[3]: target_bb[3] = bbox[3]
|
target_bb[1] = bbox[1]
|
||||||
|
if bbox[2] > target_bb[2]:
|
||||||
|
target_bb[2] = bbox[2]
|
||||||
|
if bbox[3] > target_bb[3]:
|
||||||
|
target_bb[3] = bbox[3]
|
||||||
|
|
||||||
# Find source and target size difference for scaling
|
# Find source and target size difference for scaling
|
||||||
x_ratio = (target_bb[2] - target_bb[0]) / (source_bb[2] - source_bb[0])
|
x_ratio = (target_bb[2] - target_bb[0]) / (source_bb[2] - source_bb[0])
|
||||||
|
|
Loading…
Reference in New Issue