On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Pixel Font Converter!

Lets you create your own TTF fonts out of pixel font images! · By YellowAfterlife

Line break support in the Sample Text field

A topic by Jason Gilman created 6 days ago Views: 30 Replies: 5
Viewing posts 1 to 2
(1 edit)

It seems to be the convention for most fonts to set Sample Text to:

ABCDEFGHIJKLM
NOPQRSTUVWXYZ
abcdefghijklm
nopqrstuvwxyz
0123456789

but the Sample Text field in Pixel Font Editor doesn’t support newlines. I can correct this in FontForge, but it would be nice if Pixel Font Converter just supported this functionality by default.

Developer

I’m not sure if Windows font preview even shows Sample Text, but in the downloadable version you could probably change the <input> for Sample Text to be a <textarea> and that would work.

Cool, thank you. I will try that approach. I’ve also run into weird Sample Text display glitches in Font Book depending on the browser I used Pixel Font Converter in to generate the font. Chrome is fine (so I’ll just use it going forward), but if I use Firefox the text is shifted down vertically so that only the top most line of a character shows.

Developer

If you mean the preview field (right half of the application), Firefox will not render fonts that have ascent-descent-linegap (second tab) set up incorrectly or have characters exceed these boundaries. There’s a little calculator there showing whether what you’re doing is a bad idea.

I was referring to the Font Book preview that is shown for a given font. The Text Area change you suggested nearly works, but it looks like there is a subtle linebreak/cr encoding difference in there somewhere.

Sample-Text looks correct in Font Forge with my expected 5 rows of text, but the breaks aren’t recognized in Font Book until I delete the breaks in Font Forge, re-add them, and export again.

Before: After:

Developer

Oh, that’s weird. Testing on my (win10) machine, textarea.value seems to use \n breaks across both Firefox and Chromium, but also I’m not seeing anything about newline format in spec, which is concerning.

I’ll get to it after the existing pile of tasks