oppiliappan / scientifica

tall, condensed, bitmap font for geeks
SIL Open Font License 1.1
1.86k stars 29 forks source link

TrueType variant #25

Closed deadcombo closed 4 years ago

deadcombo commented 6 years ago

Do you have plans to make a .ttf variant of scientifica? I really like your font, and I would quite like to use it on my Android phone as well. I've grabbed the Niivu conversion, but that's a bit out of date and doesn't have the bold variant.

I would be happy to do it myself, but I don't know the first thing about manipulating fonts. If you have some pointers on what I should do to convert the font myself, I would really appreciate it.

RewoundVHS commented 6 years ago

This sounds like a good idea. I will get to work on this Monday.

deadcombo commented 6 years ago

That's good to hear! If there's anything I can do to help, just let me know.

oppiliappan commented 6 years ago

I believe android typefaces need to have a minimum of 6 styles (including thin, extra thin)?

If so, it might not be possible, but Ill give it a go nevertheless.

The procedure is as follows (as explained by niivu):

I extracted each characters bmp file converted them to a png. Multiplied the size of each character by 25 so each pixel equaled 25. Erased the white. Traced them back into the font editors ttf file.

Note that this requires each character to be extracted manually.

Scientifica regular ~500 chars
Scientifica bold ~100 chars
Scientifica cursive ~50 chars

deadcombo commented 6 years ago

That's a lot more work than I imagined, I'm sorry, I didn't know what I was asking for... These are uncharted waters for me, but it sounds like a job for GIMP and FontForge.

Perhaps a script could make this a bit easier. I will look into this on my spare time.

Thank you Neve and Akshay.

RewoundVHS commented 6 years ago

NerdyPepper, I noticed you merged my .ttfs. These files were not functional at all, I meant to remove them from my fork after testing them but didn’t get the chance. I have removed them from this repo and my fork. I will issue a PR if I manage to get them to work. I’m sorry for any inconvenience/confusion.

RewoundVHS commented 6 years ago

By the way, the main issue I’m running into is with Autotrace in FontForge. I was attempting to use the script found here https://github.com/koemaeda/potrace-pixelperfect but the Autotrace function remains greyed our even after setting my environment variable to the script and selecting all glyphs.

deadcombo commented 6 years ago

Stupid question, do you have either the autotrace or the potrace packages installed? They don't come with FontForge.

On June 11, 2018 3:32:36 PM GMT+01:00, Neve Laughery notifications@github.com wrote:

By the way, the main issue I’m running into is with Autotrace in FontForge. I was attempting to use the script found here https://github.com/koemaeda/potrace-pixelperfect but the Autotrace function remains greyed our even after setting my environment variable to the script and selecting all glyphs.

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/NerdyPepper/scientifica/issues/25#issuecomment-396264693

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

RewoundVHS commented 6 years ago

I installed Autotrace through the AUR package but I don’t have Potrace installed.

deadcombo commented 6 years ago

I would assume that you need to install potrace to run that script. There's a package in the AUR.

Then I guess you need to choose "prefer potrace" in the FontForge settings.

That's what I did this morning.

On June 11, 2018 4:46:33 PM GMT+01:00, Neve Laughery notifications@github.com wrote:

I installed Autotrace through the AUR package but I don’t have Potrace installed.

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/NerdyPepper/scientifica/issues/25#issuecomment-396290414

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

deadcombo commented 6 years ago

Oh, also, did you import the font on the background of a new file?

The autotrace function needs the font to be loaded in the background.

On June 11, 2018 4:46:33 PM GMT+01:00, Neve Laughery notifications@github.com wrote:

I installed Autotrace through the AUR package but I don’t have Potrace installed.

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/NerdyPepper/scientifica/issues/25#issuecomment-396290414

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

deadcombo commented 6 years ago

By using very basic FontForge scripting, I have extracted all glyphs into .png files. How would you prefer I share them?

Also, any ideas on multiplying by 25 and erasing the white?

RewoundVHS commented 6 years ago

You could create a fork and add the pngs to your repo! A Python script could multiply the glyphs, removing the background could be done in GIMP (but could also probably be scripted). Also it’d be really awesome if you could share the FontForge script you used. I’m hoping to combine everything at the end into one script to make building TTFs automated.

deadcombo commented 6 years ago

Here is my fork.

The files are under 'glyph_png', the script is called fontforge_export. My method is at the end of the README file.

Did you have any luck autotracing?

deadcombo commented 6 years ago

I extracted each characters bmp file converted them to a png. Multiplied the size of each character by 25 so each pixel equaled 25. Erased the white. Traced them back into the font editors ttf file.

Multiplying and erasing is done. Already updated the files on the cloned repository, under the glyph_png directory. Using imagemagick, I did it with these commands:

mogrify -transparent "#ffffff" *.png
mogrify -resize 2500% *.png

I am very unsure about the resize however. Are you sure they're supposed to be 25x bigger? Doing this to a .png distorts badly... If scaling is necessary, maybe this could be done with vector files instead?

(A note on the mogrify command: it modifies existing files directly. If you don't want this, use convert instead and pass an output argument.)

Anyway, I'd prefer to leave the autotracing to you if you don't mind, as I don't have any experience editing fonts.

RewoundVHS commented 6 years ago

Thank you so much for your work. I haven’t worked on tracing as I’ve been busy with classes and working on other parts of the project. I’ll get back to working on this over the weekend.

outpoints commented 6 years ago

Did you guys get anywhere? @deadcombo @RewoundVHS Trying to use this as my font in Command Prompt and it's messed up past 12px. If there's anything I can do let me know :)

oppiliappan commented 5 years ago

https://files.nerdypepper.me/x7.png

an attempt to autotrace scientifica using bdf2ttf and autotrace.

xxzozaxx commented 5 years ago

Hellow @NerdyPepper, thanks for this awesome font. I tried BitsNPicas font converter and it seem to works. just need some final touch.

Could you try it plz.

xxzozaxx commented 5 years ago

2019-11-01-104425_954x881_scrot 2019-11-01-104449_954x881_scrot Here is the example

oppiliappan commented 5 years ago

nice one @xxzozaxx! ill take a crack at this, and maybe, we can start shipping out rasterized vector fonts as well!

alystair commented 4 years ago

Any update re: Windows friendly fonts? Been a while

oppiliappan commented 4 years ago

@alystair i did in fact get things to work with Bits 'n' Picas! Ill soon have a release containing ttf fonts

oppiliappan commented 4 years ago

you can find the ttf variants under /ttf. i haven't tested to check if all characters render fine, but it looks good so far. give it a go and post your feedback in this thread!

big thanks to @xxzozaxx for making this happen!

alystair commented 4 years ago

Cheers, tried them out. Seem to render with blurry edges

VSCode:

image

image

Illustrator (notice top edges): image

oppiliappan commented 4 years ago

@alystair that is to be expected. the font will render "crispily" only at certain sizes, namely, 11px and multiples of 11px (provided your font rendering engine scales without interpolation).

alystair commented 4 years ago

Thanks. Wish fonts that are crisp only at specific intervals had a way of communicating it.. Only option would be as part of the font name right? E.g. Scientifica11

oppiliappan commented 4 years ago

Only option would be as part of the font name right?

Not really. Font rasterization is kind of an "inside" feature that the user shouldn't really be bothered about. Also, fonts may be rasterized at more than one size, Pragmata Pro, for example, provides crisp versions for all sizes from 9px through 14px.

Perhaps it would be best to simply mention it in the readme?

Since the issue at hand as been addressed, I will be closing this issue (the ttf variant is ready to go), but feel free to continue discussion here.

alystair commented 4 years ago

Readme sounds good thanks!