javierbyte

Joined 12 years ago

Karma
1,003
Submissions
68
Member since
Sep 10
https://javier.xyz
View on Hacker News

Recent submissions

Comment · 1 year ago
Hey! For the real-time editor I have an invisible textarea in the background with a monospace font and I'm rendering SVGs on top of it, each character is a React component.
Comment · 1 year ago
Comment · 2 years ago
I saw another post an hour ago with a similar demo and was inspired to post it here. Isn't it wonderful that browsers and laptops are so powerful nowadays?
Comment · 2 years ago
Comment · 4 years ago
this is great! how do you feel using the coordinates? can I link the video on the github readme?
Comment · 4 years ago
When you download the font then it is a normal font and that does not happen. On the website, to make it possible to edit the characters in real time I'm drawing the font as SVG behind an invisible textarea; so when the text is edited really the textarea is changing and I'm drawing SVG behind every character to make it look like a textarea with the custom font. I'm curious which browser/OS are you using since I don't see the textarea text when I highlight something.
Comment · 4 years ago
That would be amazing!
Comment · 4 years ago
I made that change, and added a separate button to delete the layer :)
Comment · 4 years ago
Sounds so good! That is a feature that I want to implement, when I was making the font I wanted the same feature (but decided to finish the font first!) so what I end up doing was using a different character to create a variation of a char and then replacing the coordinates in the JSON file later.
Comment · 4 years ago
If you open the editor on a bigger window (I think I made it 1000px or more) you'll get the "full" editor with the dots that you are missing. I may make it an option so you can get the full editor on mobile too.

And yes, more points and different aspect ratio would be nice, currently the `textarea` works by having a native textarea invisible on top of the SVG render, and tuning it to be in sync was a bit hard. So I think I can make custom grids and ratios happen but I'll have to disable the textarea for them, no big deal I guess :)

Comment · 4 years ago
1. Noted, the buttons are confusing. In the meantime: "download" downloads the original font that I made, "download edited" download currently edited font (if you have made any edits) in .otf format, "download json" downloads each char definition as coordinates, and "restore json" lets you restore a previously edited json so you can keep editing your font. Everything happens locally, there are no servers. 2. Yep 3. Do you have something in mind? :)
Comment · 4 years ago
Hello HN! I wanted to make a font that I can "snap" to vertices on a grid for an upcoming project, and after starting making it I decided that it was going to be easier to iterate if I made an editor too. It uses opentype.js to generate the font and some invisible textarea tricks combined with svg for the text editor.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton