doubler script
csmcg opened this issue · 5 comments
Is there any documentation on the doubler script? I assume it is supposed to increase the font's size by two but I don't really know a lot about fonts and how they work. The size 11 is far too small on my high DPI display so I figured I would try the script before moving on to a different font for me. I tried running the script like
python3 doubler.py < scientifica-11.bdf
But I get this error:
Traceback (most recent call last):
File "doubler.py", line 30, in <module>
bdf = reader.read_bdf(sys.stdin)
File "/home/cnnr/.local/lib/python3.5/site-packages/bdflib/reader.py", line 117, in read_bdf
[_read_property(iterable, font) for i in range(propertyCount)]
File "/home/cnnr/.local/lib/python3.5/site-packages/bdflib/reader.py", line 117, in <listcomp>
[_read_property(iterable, font) for i in range(propertyCount)]
File "/home/cnnr/.local/lib/python3.5/site-packages/bdflib/reader.py", line 66, in _read_property
key, value = iterable.next().strip().split(' ', 1)
AttributeError: 'generator' object has no attribute 'next'
Any help would be appreciated, thanks.
Hi, as a follow up I did some more looking at this today and it seems to be an error in bdflib. I am no
The iterable.next()
isn't valid Python3 I believe, so I went through and changed the bdflib file next(iterable)
for everywhere in the file and it now works. Still can't get the font working on my system but it resolves the original issue. You may want to add a comment to your script telling people this.
Was it really that simple? Could you provide the changes you made?
I may have worded it wrong, since it's not really replacing the metadata, but something much simpler. After noticing that some lines were missing in the script's output in comparison to the original file (like FONT_NAME, for example), I tried just pasting those lines from the original to the output file and it happened to work. Also changed STARTPROPERTIES 8 to STARTPROPERTIES 34. I don't know if this is the optimal solution, but as I said it works.
I also had to do the change in reader.py previously mentioned in this thread.