IdreesInc / PlayBook

A cranky ebook reader for the Playdate console
https://play.date/games/playbook/
Mozilla Public License 2.0
28 stars 5 forks source link

text format supports variants, but render only kinda does #8

Open Yamavu opened 3 months ago

Yamavu commented 3 months ago

I was wondering why weird font changes were happening, didn't find anything in code and researched a bit. turns out Playbook supports bold and italic via the standard library

playdate.graphics.drawText("normal *bold* _italic_", x, y)

It seems like a flavor of Textile instead of the more popular markdown.

PlayBook 2024-03-20 08 17 39

for that to work, the bold and italic variants have to be set alongside the regular font. (see Inside Playdate)

(On the other hand if this behavior is unwanted, playdate.graphics.font:drawText() instead of playdate.graphics.drawText(). I think it makes this app more usable and loosens up the text.)

BTW: above markup information should be handy for creating a guide for formatting books.

IdreesInc commented 2 months ago

Oh, that's unexpected! Didn't expect that, maybe text formatting is more possible than I thought, will have to keep this in mind if I add the epub to txt converter in the future. Also I see that you are using possibly the very first version of PlayBook, heads up that the updated versions are available on itch.io (if you downloaded it there previously) or on the catalog!

Yamavu commented 2 months ago

yeah I'll have to wrap my head around the way Playdata does fonts and actually make em, I'd have a Pull Request ready pretty soon. The silly idea that started this was to get a flavor of OpenDyslexic to work on that little screen. Thanks for the headsup. I didn't find the itchio page yet