Giter Site home page Giter Site logo

bdf-to-image's Introduction

Makutamoto

Makutamoto Makutamoto

Makutamoto's github stats Top Langs

コマンドプロンプトゲーム

コマンドプロンプト3Dレーシングゲーム

競技プログラミング関係制作物

MojaCoder AtCoder Badges AtCoder相性診断 AtCoder Twitter Profile Updater

Javascript Game

simple-shooting.js

Minecraft系制作物

Minecraft Server Status Badge

その他

Twitter User Heatmap Cherry Grape ttygraph

PR

crowd4u_banner364x93

bdf-to-image's People

Contributors

makutamoto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

vfig siler

bdf-to-image's Issues

UnicodeDecodeError while parsing BDF input file

bdftoimg terminates with UnicodeDcodeError.

/home/a3/PycharmProjects/pythonProject/venv/bin/python /home/a3/PycharmProjects/pythonProject/bdftoimg.py /home/a3/Documents/bdf-to-image-master/shnm6x12r.png out.img
Traceback (most recent call last):
File "/home/a3/PycharmProjects/pythonProject/bdftoimg.py", line 38, in
inputData = f.read()
File "/usr/lib/python3.8/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

I guessed, a BDF file is basically a hex file, so I changed with 'open(inputFile) as f:' to 'with open(inputFile, 'rb') as f:'
That did not help either, Regex seems to have problems with hex data.

Traceback (most recent call last):
File "/home/a3/PycharmProjects/pythonProject/bdftoimg.py", line 48, in
for char in clauseRegex.finditer(inputData):
TypeError: cannot use a string pattern on a bytes-like object

Any thoughts an this problem ?

Cheers, Adrian

ValueError: invalid literal for int() with base 16: 'ENDCHAR'

Excuse me, but I still have a real problem, I think.

I am trying to convert bitocra/bitocra.bdf to an image file.
It terminates with the following exception:

/home/a3/PycharmProjects/pythonProject/venv/bin/python /home/a3/PycharmProjects/pythonProject/bdftoimg.py /home/a3/Documents/bitmap-fonts/bitmap/bitocra/bitocra.bdf out.png
Traceback (most recent call last):
File "/home/a3/PycharmProjects/pythonProject/bdftoimg.py", line 55, in
bin = int(line, 16)
ValueError: invalid literal for int() with base 16: 'ENDCHAR'

The exception occurs after processing the last STARTCHAR / ENDCHAR section, which is followed by ENDFONT.
I have been trying to get the shnm6x12r.bdf file but where unable to.

if you want to see the font I have been working on, I need an email address for sending, it can be downloaded from the internet.
I hope you can help with this problem (I am not regExp person ...).

Cheers, Adrian

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.