starting in on proper font drawing

This commit is contained in:
Adam Mayer 2018-01-02 14:56:56 -05:00
parent 7268a1e872
commit 4872944fd3
2 changed files with 8 additions and 1 deletions

View File

@ -2,6 +2,8 @@
import sys
import math
import cairo
import pkg_resources
import pickle
def coordlist(line,expected=-1):
l = list(map(float,line.split(',')))
@ -42,6 +44,10 @@ class CairoPlotter:
self.text_theta = 0
self.text_size = 1
self.update_ctm()
# load plotter fonts
char_f = open(pkg_resources.resource_filename('apple410','data/a410_chars.pickle'),'rb')
self.char_map = pickle.load(char_f)
# A quick review of coordinate systems:
# Cairo native: origin at upper left, x+ to right, y+ down.

View File

@ -43,7 +43,8 @@ setup(
# You can just specify the packages manually here if your project is
# simple. Or you can use find_packages().
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
packages=['apple410'],
package_data={'apple410' : ['data/*.pickle']},
install_requires=['pyserial'],
python_requires='>=3',