adafruit / Adafruit_CircuitPython_framebuf

CircuitPython framebuf module, based on the Python framebuf module
MIT License
39 stars 36 forks source link

Add font5x8.bin to Bundle #11

Closed Tasm-Devil closed 5 years ago

Tasm-Devil commented 5 years ago

Hi there! I'm currently running the import examples.ssd1306_framebuftest in Circuitpython4 on a nrf52840 Express board. I have to copy the font5x8.bin manually to the examples folder. Is it possible to add this font in the Adafruit_CircuitPython_Bundle and locate it by default in the font folder in the CIRCUITPY device?

ladyada commented 5 years ago

@kattni i'm not sure how to do this but maybe you have an idea!

kattni commented 5 years ago

@Tasm-Devil I'm not entirely sure what you mean by "locate it by default in the font folder in the CIRCUITPY device".

The two options that seem reasonable are to have it added to the examples folder in the bundle, or to restructure the library to be a package and locate the font8x5.bin folder with the adafruit_framebuf.py module in the package folder.

As the file goes with the example, I think it makes the most sense to include it in the examples folder. This will involve updating circuitpython_build_tools to recognise and include the file. We're looking into what that means.

@ladyada Please let me know if including it in the examples folder in the bundle is sufficient.

ladyada commented 5 years ago

i think having it copied into the examples folder would work best?

kattni commented 5 years ago

Ok. I'll talk to @sommersoft about it.

sommersoft commented 5 years ago

On it!

sommersoft commented 5 years ago

Got it working locally.

(.env) sommersoft@thespacebetween:~/Dev/cpy-build-tools/circuitpython-build-tools/bundles$ unzip -l test-4.x-mpy-1475ae7.zip
Archive:  test-4.x-mpy-1475ae7.zip
{"build-tools-version": "devel"}
  Length      Date    Time    Name
---------  ---------- -----   ----
    1282  2019-02-04 21:49   test-4.x-mpy-1475ae7/examples/font5x8.bin
     997  2019-02-04 21:49   test-4.x-mpy-1475ae7/examples/framebuf_simpletest.py

@Tasm-Devil, give it a few days. Gotta push to the circuitpython-build-tools repo, then it will get pushed to PyPI, and then the Bundle will build with it included.

sommersoft commented 5 years ago

Just to follow up, font5x8.bin is now included in the examples folders with the bundle releases.

capture