mirror of
https://github.com/phooky/Apple-410.git
synced 2024-10-31 21:07:02 +00:00
starting in on proper font drawing
This commit is contained in:
parent
7268a1e872
commit
4872944fd3
@ -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.
|
||||
|
3
setup.py
3
setup.py
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user