News: 11 March 2016 - Forum Rules, Mobile Version
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia

Author Topic: Basic font prerendering script  (Read 267 times)

Kiyoshi Aman

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 2205
  • Browncoat Captain
    • View Profile
    • Aerdan's Blog
Basic font prerendering script
« on: December 05, 2017, 10:16:24 pm »
Due to discussions in the #romhacking_discussion channel on Discord, I accidentally a script for prerendering text.

Requires Python 3 and PyQt5 (which, if you have Python 3.5 or later, just needs pip3 install PyQt5). See included readme for additional information.

Sample output:


EDIT: Smeargle 0.1 release.
EDIT: Smeargle 0.2 release, same URL. This version emits a new file <script>_index.txt, which provides a line<->tile map.

Sample output, using the same file as was used in the above image:
Code: [Select]
Potion -> 0, 1, 2, 3, 4, 4
Hi Potion -> 5, 6, 7, 8, 9, 10, 4, 4, 4
Phoenix Tail -> 11, 12, 13, 14, 15, 16, 17, 18, 4, 4, 4, 4
X-Potion -> 19, 20, 21, 22, 23, 24, 4, 4
Huh?! -> 25, 26, 27, 28, 4
Oh my god, are you serious?! -> 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 27, 28, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4

EDIT: Smeargle 0.3.2 released. New utility porygon.py for conversion to console graphics formats. Linear 1, 2, and 4; and planar 2 bits-per-pixel formats are supported, with aliases—run porygon.py without arguments for formats supported.
« Last Edit: December 08, 2017, 04:05:03 pm by Kiyoshi Aman »

Kiyoshi Aman

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 2205
  • Browncoat Captain
    • View Profile
    • Aerdan's Blog
Re: Basic font prerendering script
« Reply #1 on: Today at 12:07:53 pm »
Just a note, smeargle 0.3.4 was out for a while now. I just forgot to update this thread.

Notable improvements:
  • Palette mapping. Provide a plaintext file with n=m, one per line, to force a specific palette order. Note that this is going to have to be edited for each run of smeargle, because Qt5's indexed conversion doesn't have a defined order.
  • The planar2 mode for porygon works now.
I'm waiting on Pagure to run on Python3 before I make the git repository for smeargle available, but in the meantime I do accept patches.