peterhinch / micropython-font-to-py

A Python 3 utility to convert fonts to Python source capable of being frozen as bytecode
MIT License
368 stars 67 forks source link

Can I use this to get all the pixel x, y coordinate positions of a glyph? #37

Closed ShaunKulesa closed 2 years ago

ShaunKulesa commented 2 years ago

Can I use this library to get all the pixel x, y coordinate positions of a glyph? I want to get every pixel in a glyph created in free type. Here's the code I have:

import freetype
face = freetype.Face("Arial.ttf")
face.set_char_size( 48*64 )
face.load_char('S')
bitmap = face.glyph
peterhinch commented 2 years ago

This is really a query about freetype rather than about my code. To answer it I'd have to research freetype to refresh my memory of how it works - it's five years since I used it in earnest to write font_to_py. I'm afraid I'm too busy to tackle this at the moment.