mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-14 05:36:48 +03:00
Adjusted variable names and comments to better match specification
This commit is contained in:
parent
fcc59a4001
commit
c799bd8a03
|
@ -64,16 +64,18 @@ def bdf_char(f):
|
||||||
bitmap.append(s[:-1])
|
bitmap.append(s[:-1])
|
||||||
bitmap = b"".join(bitmap)
|
bitmap = b"".join(bitmap)
|
||||||
|
|
||||||
# The word BBX followed by the width in x (BBw), height in y (BBh),
|
# The word BBX
|
||||||
# and x and y displacement (BBox, BBoy) of the lower left corner
|
# followed by the width in x (BBw), height in y (BBh),
|
||||||
# from the origin of the character.
|
# and x and y displacement (BBxoff0, BByoff0)
|
||||||
|
# of the lower left corner from the origin of the character.
|
||||||
width, height, x_disp, y_disp = [int(p) for p in props["BBX"].split()]
|
width, height, x_disp, y_disp = [int(p) for p in props["BBX"].split()]
|
||||||
|
|
||||||
# The word DWIDTH followed by the width in x and y of the character in device units.
|
# The word DWIDTH
|
||||||
dx, dy = [int(p) for p in props["DWIDTH"].split()]
|
# followed by the width in x and y of the character in device pixels.
|
||||||
|
dwx, dwy = [int(p) for p in props["DWIDTH"].split()]
|
||||||
|
|
||||||
bbox = (
|
bbox = (
|
||||||
(dx, dy),
|
(dwx, dwy),
|
||||||
(x_disp, -y_disp - height, width + x_disp, -y_disp),
|
(x_disp, -y_disp - height, width + x_disp, -y_disp),
|
||||||
(0, 0, width, height),
|
(0, 0, width, height),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user