mirror of
https://github.com/Kozea/WeasyPrint.git
synced 2024-10-05 00:21:15 +03:00
Use the saved pango_font
This commit is contained in:
parent
0a412542d9
commit
088e06da0e
@ -94,13 +94,13 @@ class Font():
|
||||
self.glyphs += (
|
||||
glyph_string.glyphs[x].glyph for x in range(num_glyphs))
|
||||
|
||||
def compute_font_bbox(self, pango_font):
|
||||
def compute_font_bbox(self):
|
||||
font_bbox = None
|
||||
ink_rect = ffi.new('PangoRectangle *')
|
||||
|
||||
for glyph in self.glyphs:
|
||||
pango.pango_font_get_glyph_extents(
|
||||
pango_font, glyph, ink_rect, ffi.NULL)
|
||||
self.pango_font, glyph, ink_rect, ffi.NULL)
|
||||
if font_bbox is None:
|
||||
font_bbox = [
|
||||
ink_rect.x, ink_rect.y, ink_rect.width, ink_rect.height]
|
||||
|
Loading…
Reference in New Issue
Block a user