| 1 |
import logging |
| 2 |
|
| 3 |
from babelfont.Font import Font |
| 4 |
|
| 5 |
logger = logging.getLogger(__name__) |
| 6 |
|
| 7 |
|
| 8 |
def zero_background_width(font: Font, args=None): |
| 9 |
logger.info("Zeroing background width") |
| 10 |
for glyph in font.glyphs: |
| 11 |
for layer in glyph.layers: |
| 12 |
if layer.isBackground: |
| 13 |
layer.width = 0 |
| 14 |
|
| 15 |
|
| 16 |
def decompose_backgrounds(font: Font, args=None): |
| 17 |
logger.info("Decomposing backgroundss") |
| 18 |
for glyph in font.glyphs: |
| 19 |
for layer in glyph.layers: |
| 20 |
if layer.isBackground: |
| 21 |
layer.decompose() |