14 ms·
I made a font based on my handwriting
- kleiba 6y agoAn interesting part is that the author was going for a literate programming [1] approach using Emacs org-mode [2]. The resulting file is here: https://raw.githubusercontent.com/sachac/sachac-hand/master/README.org https://raw.githubusercontent.com/sachac/sachac-hand/master/... The point (and the difference to just thoroughly commenting your code) is that you have one source file that equally serves as the basis for generating the actual program as well as its documentation. The link above shows the raw file, github renders it nicely if you go to the main page of the repository. [1] https://en.wikipedia.org/wiki/Literate_programming https://en.wikipedia.org/wiki/Literate_programming [2] https://orgmode.org/ https://orgmode.org/
- renke1 6y agoI'v always liked the idea of literate programming, but I was always wondering how it actually feels in practice. Do they usual editor/IDE features still work like in a non-literate environment? – I assume it might work in Emacs, but are there other editors that support this approach? Thinking about it, is Jupyter Notebooks (and the like) a form of literate programming? Thinking even more about it, I think I actually used (or tried to) literate programming in a course about Machine Learning using R and – if I remember correctly – LaTeX to generate the actual application and a PDF.
- LeanderK 6y agoIn my view Jupiter notebooks can be, but must not be, a form of literate programming. Many tutorials take the form of a single juypter-notebook exaplaining concepts with code interleaved, which i would argue is a form of literate programming. But my data-exploration notebooks, mostly code and an abundance of plots with sparse comments interleaved, don't really resemble anything i would call literate programming.
- mkl 6y agoDo you mean "need not be" rather than "must not be"? "Must not be" means they shouldn't ever be. Most of my Jupyter notebooks are just code, but I've got some with long Latex mathematical derivations of formulas that appear in the code. I would actually like to be able to have that kind of thing in comments within the code itself. I don't do literate programming really though.
- LeanderK 6y agoah sry, i am german and frequently do this wrong since it's the exact opposite in german.
- gorgoiler 6y agoIt was disappointing to me when I recently found out that I couldn’t create Jupyter notebooks with vim. The on-disk format is JSON. It sounds silly, but when there’s a lot of work do in terms of writing the literature part, and then adding the actual code part, I’m much happier with vim than I am with the browser based editor. (This is for producing literate programs for the purpose of teaching others, not for my own benefit.)
- akdor1154 6y agoYou should look into Jupytext, it might be just what you're after.
- d0mine 6y agoYou could use https://github.com/dzop/emacs-jupyter https://github.com/dzop/emacs-jupyter to combine Org mode + Jupyter. Here's an example emacs configuration: (use-package jupyter :after org :config (org-babel-do-load-languages 'org-babel-load-languages '((jupyter . t))) ;; default args for jupyter-python (setq org-babel-default-header-args:jupyter-python '((:results . "replace") (:async . "yes") (:session . "py") (:kernel . "python3")))) After that, you could execute jupyter code block (Org Babel): #+begin_src jupyter-python 1+1 #+end_src #+RESULTS: : 2 You can use latex in org-mode, generate pictures, get nice git diff, export it to pdf, etc.
- amake 6y agoJust curious: That code could be run by just plain `#+begin_src python`. What does using Jupyter gain you?
- d0mine 6y agoNothing inherent to Jupyter (it is not like Jupyter notebooks vs. Python REPL), just some niceties: - low latency (it feels more responsive) - interactive output (tqdm works) - how Python objects are displayed by default Essentially a good implementation of Python code blocks would reimplement half of Jupyter anyway.
- BeetleB 6y ago> I'v always liked the idea of literate programming, but I was always wondering how it actually feels in practice. Do they usual editor/IDE features still work like in a non-literate environment? – I assume it might work in Emacs, but are there other editors that support this approach? In Org Mode, you get all the syntax highlightings and keybindings for whatever language's mode if you do literate programming with it. What you won't get are things like being able to integrate your compilation failures, etc. As an example, if you write something that fails to compile, Emacs will not quickly be able to take you to the line that caused the failure. Similarly, things like linting, etc typically break. Frustratingly, if you get an exception (e.g. "KeyError" in Python), it will not show the result of any print statements, so debugging is a bit painful. I'm sure someone can solve these problems, but I don't know that anyone has.
- sachac 6y agoI figured out that if you use the : session keyword, you can still see the prints before the exception. I tend to use something like :session "argh".
- jcheng 6y agoIt’s extremely widely used in the R world. The RStudio IDE has extensive tooling for the R Markdown format. https://rmarkdown.rstudio.com/ https://rmarkdown.rstudio.com/ We don’t use the term “literate programming” much anymore, the concept of “reproducible reports” resonates much more with R users. But the experience is much the same. (Disclosure: employed at RStudio)
- michaelmrose 6y agoThey can in theory but making it work in practice seems a little harder. For example I tried this https://github.com/jingtaozf/literate-clojure https://github.com/jingtaozf/literate-clojure but ran into this https://github.com/polymode/poly-org/issues/20 https://github.com/polymode/poly-org/issues/20 Either some IDE like functionality doesn't work or syntax highlighting doesn't work after you go through additional complexity compared to simply starting a project.
- bloopernova 6y agoIn my devops work, I've been using literate programming as part of my personal documentation. Org-mode gets a lot of hype here on HN, but I really get a lot of value out of Org, Org-Roam, and Org-Babel (org-babel is the bit that underpins the literate programming part of org) Being able to see the code that generates certain tables in my older documentation really helps me to more quickly remember and use stuff I did months or years ago. Example: The command to get a list of S3 buckets that have a particular attribute set. The command to do that might not make much sense by itself (say in a history grep) but with extra text describing what and why, I understand it faster.
- spudlyo 6y agoI also use org-babel to do the same thing at work, most recently with convoluted AWS CLI commands with lots of JMESPath query syntax that I can never remember. I use it for personal documentation, but it can also can make for very nice looking documents that you can later share with your team during Sprint retrospectives, or perhaps convert to a Confluence page.
- bloopernova 6y agoYes exactly, export to HTML and paste into Confluence. Although it is nice also to show off my Emacs setup during a screen share to a couple dozen people who don't know what it is. They treat the org-mode headlines, rearranging, todo items, schedules, etc, as some sort of magic. Org-babel with the results in a simple table kinda blew their minds. The number of project managers who want "my emacs setup" created for themselves was kinda funny, since they're all normally so focused on Microsoft Project or Jira.
- sachac 6y agoIt turned out that going with Org Mode was an excellent idea! I wrote another post about the changes I made last night: https://sachachua.com/blog/2020/06/having-fun-kerning-using-org-mode-and-fontforge/ https://sachachua.com/blog/2020/06/having-fun-kerning-using-... Basically, tables rock, especially when you can use rectangle commands to copy and paste kerning values between classes you have to split up, and generating a test webpage programmatically is fun too. :D
- kleiba 6y agoAwesome! I remember your website from way back when, it was nice to see it come up on HN again with some really cool content.
- sachac 6y agoHahaha, I'm only just now emerging from the fog of raising a small child. She keeps telling me not to stay up late at night, I keep staying up at night because I want to do stuff...
- sachac 6y agoIt was really nice being able to break the program down into steps like generate the template, cut glyphs, etc. and be able to execute parts without worrying about how to reevaluate all the relevant parts of the code or what kind of functions I want to define. I'm beginning to really like noweb.
- mono-bob 6y agoIf I look at the resulting font in Safari on my iPhone it shows up as double lines. Until I zoom in, then it suddenly looks fine. Does anyone have an idea what is the cause of this?
- sings 6y agoThis is the browser trying to produce a bold version of the typeface when one wasn’t loaded in.
- sachac 6y agoOh! I should totally make a bold version instead of relying on the browser. Thanks to both of you for testing and troubleshooting! I'll do it later after the kiddo goes to bed. I'm excited about looking into alternate glyphs too.
- srean 6y agoI would love to have a font made out of Dijkstra's handwriting, if for nothing else but for the legacy -- of the man and his EWDs. He used to have pencil hanging on a string in his office. It was labeled "word processor". Ironically enough, Dijkstra's algorithm is perhaps least of his accomplishments. EDIT: thanks FrenchyJiby, mkl. Wasn't aware
- mkl 6y agoThere is one, downloadable all over the place, but I can't find the origin. Try searching for [dijkstra font].
- FrenchyJiby 6y agoDo you know of previous attempts to do so[1]? There's a TrueType font as per your wishes[2]! [1]: http://lucacardelli.name/indexArtifacts.html http://lucacardelli.name/indexArtifacts.html [2]: http://lucacardelli.name/Artifacts/Fonts/Pc/dijkstra.ttf http://lucacardelli.name/Artifacts/Fonts/Pc/dijkstra.ttf
- renke1 6y agoThat's awesome. I think it really adds a nice personal touch to own's blog. If only my handwriting wasn't that bad and I had a blog…
- app4soft 6y ago> and I had a blog… Why not start one just right now?[0] [0] https://sachachua.com/blog/no-excuses-blogging https://sachachua.com/blog/no-excuses-blogging
- deleted 6y ago[deleted]
- yesenadam 6y agoWarning: You will have to give your email (and possibly $) to read the linked ebook. There seems something more than a little sordid about linking to one's own stuff on HN in that way.
- spudlyo 6y agoThere is no indication that app4soft is Sacha Chua, who is considered by many to be a pillar of the Emacs community. I would not hesitate to trust her with my email address.
- app4soft 6y ago> There is no indication that app4soft is Sacha Chua Correct. I only posted link to Sacha Chua's blog pages, but has no any relation to posted content.
- app4soft 6y agoOn linked page there is a link to public SlideShare version of this book: > 2014-02-24: Want it without letting me know your e-mail address? You can snag the PDF from Slideshare.[0] (You'll have to manually check for updates, though.) [0] http://www.slideshare.net/sachac/2014-0214-a-noexcuses-guide-to-blogging-sacha-chua-v2 http://www.slideshare.net/sachac/2014-0214-a-noexcuses-guide...
- tombert 6y agoHeh, if I were to make a font based on my handwriting, it would almost work as some level of encryption on my blog; there’s certainly no way anyone would be able to read it.
- aasasd 6y agoUntil you meet a pro: https://i.imgur.com/odBU94z.jpg?1 https://i.imgur.com/odBU94z.jpg?1
- pmiller2 6y agoThat reminds me of certain kinds of medieval script. I had a professor in college whose dissertation made use of 12th century medical texts as primary sources. She told us about some of the frustrations with reading it. Calligraphic letterforms of the time use this basic form called a “minnum” (possibly not the correct spelling), possibly so called because the word “minimum” can be written in lowercase using them exclusively. I think you know where I might be going here. At one point, she went to her advisor for help, and he says in his broad, Scottish accent “Diane, count yer minna!” We all got a kick out of it. Edit: minimum -> minnum
- aasasd 6y agoFrom what I heard, ‘minimum’ was a particular flex of olde calligraphers—not for readability but for putting down the palisade of strokes properly: https://calligraphypen.files.wordpress.com/2009/04/minimum.jpg https://calligraphypen.files.wordpress.com/2009/04/minimum.j...
- kragen 6y ago"minim"
- pacaro 6y agoThis is the original inspiration for Philly handstyle
- hateful 6y ago
- aquabeagle 6y agoThere was a free website many years ago that I used, where you print out a form with blocks on it and write each letter, then scan it and upload it and it gets turned into a font. I can't seem to find it now (or maybe it went paid). Microsoft has an app that lets you do this with a Windows tablet: https://www.microsoft.com/en-us/p/microsoft-font-maker/9n9209f8s3vc?activetab=pivot:overviewtab https://www.microsoft.com/en-us/p/microsoft-font-maker/9n920...
- aaronax 6y agoYeah I was going to say...I did this in 2005. It was a Microsoft app that either came with Windows XP Tablet Edition of was otherwise widely known to enthusiast users of said operating system such as myself.
- jvns 6y agoIf you have an iPad and apple pencil, there's a really great app to do this called iFontMaker: https://2ttf.com/ https://2ttf.com/. I used it to create a font from my handwriting that I've used extensively, and creating the font took maybe 15 minutes.
- aasasd 6y agoSounds doable, suspiciously so. When I get rich and have a lot of time, I'll go through it just to figure out why ‘handwritten’ fonts don't ever include a dozen alternate sets of the same characters so the shapes actually vary—like when written by hand. Instead, I type out something like ‘na na na na na na na na na na na na na na na na Batman’ and observe the same ‘n’ and the same ‘a’ over and over.
- gregmac 6y agoThus got me curious, and I just spent a few minutes learning about OTF ligatures and alternatives, and apparently random is possible: https://graphicdesign.stackexchange.com/a/12818 https://graphicdesign.stackexchange.com/a/12818 From what I've read, the technology exists to build a font that would be a pretty convincing handwriting alternative. It would take a lot of effort, as it would n involve several glyph alternatives for each character, several variations of dozens of ligatures (joined glyphs) and randomness for selection. You could even do variants like slightly different spacing/sizing/positioning (no one writes perfectly straight). Probably part of the issue is use case. Personal handwriting is kind of neat for a headline or call-out on a blog or something, but I wouldn't necessarily want to read a whole long post that way. I'm not really sure where else it would be useful - students trying to cheat on a "handwriting required" assignment, if that's even still a thing?
- toast0 6y agoPersonal handwriting is used a lot in sales mailers. Except that it's totally fake, it looks like someone spent time on it. Same thing when they send you a letter with a post it on it. Looks real-ish.
- jhpriestley 6y agoIf the goal is to produce a simulation of handwriting then a font (which is a simulation of a case of metal blocks) seems like a bad starting point. Better to simulate a pen moving along a curve and then vary curve parameters (acceleration etc).
- 6y ago
- sn41 6y agoSacha Chua's emacs videos on YouTube are a treat. Highly recommended for the great interviews, of one emacs enthusiast talking to other emacs enthusiasts.
- sachac 6y agoThanks!
- jimkleiber 6y agoI stumbled on this site a few months back and made my own font as well: https://kidpofy.com/ https://kidpofy.com/ It's supposed to be for archiving your kid's handwriting at different ages of their life but who says that has to stop at adulthood! :-) It gave me an error looking at the site on my phone but worked if I clicked thru the error, not sure how safe that is but to each their own.
- sachac 6y agoYeah, A- was patient enough to contribute several samples of her tracing over my handwriting template, so I can't wait to make AKiddoHand4.
- sachac 6y agoHere's one of the samples: https://sketches.sachachua.com/filename/2020-05-28%20A-%20tracing.png https://sketches.sachachua.com/filename/2020-05-28%20A-%20tr...
- crazygringo 6y agoOh man. I remember back in the 1990's, there was a company that you could fill in a grid with all the letters in your handwriting (block letters only), mail it to them, and for something like $50 they'd mail you back a floppy disk with a TrueType font of your handwriting a few weeks later. These days, it occurs to me that with some kind of deep learning, you could probably take a couple dozen pages of someone's cursive, and turn it into a font with thousands of ligatures and variants that would be virtually entirely convincing.
- DoktorEgo 6y agoI don't see this mentioned anywhere here, but there's a website I came across years ago that allows you to do the same, but you just scan the sheet instead of mailing. https://www.calligraphr.com/en/ https://www.calligraphr.com/en/ Albeit it's not entirely free (pricewise or otherwise). I still think your second idea is better, where a learning algorithm "captures" handwriting and generates a font or more text with the same style. I can only imagine the implications in authenticity and forgery, though.
- davchana 6y agoI came across that in 2005s, & obviously could not pay that much; so searched around for free ways to do that. Found an article which listed to download that your website's grid; write with a thick pen; scan & then use FontForge to convert it to a font. Lot of labour. But I did it; & still have that font; used on many paper forms. Now recently few years ago I came across an app where you draw each letter on mobile; then it sends all data to its server & you get the font. It worked for few months, I made few variations of my handwriting, then its server stopped responding. Now I have another font where few glyphs of my signatures (few variations), my logo, my initials are as font; & I use it to sign checks or forms or such.
- soylentcola 6y agoIn the mid-2000's I got a Toshiba Portégé convertible laptop off eBay for a few hundred bucks. It had an active digitizer built in and had some software that let you do something similar. It wasn't fancy enough to include alternates and it wasn't the best at connecting cursive, but if you mainly used print/non-script letters like I do, it was a neat trick to be able to use some semblance of my handwriting as a font in Windows.
- deleted 6y ago[deleted]
- YeGoblynQueenne 6y agoThe post right above this one on hacker news at this time (16:20:16 UTC) is titled "What did you do"? (i.e. the title of the post above this post is a question answered by the title of this post).
- elcomet 6y agoAre there any fonts that have random variations for every letter (is it something possible to do with curent font systems?) That would be nice to create fonts that look more like real handwriting.
- amai 6y agoI want to see a math font for LaTeX based on handwriting.
- yeswecatan 6y agoMy wedding anniversary is coming up and I want to frame our wedding vows as a surprise. I'd really like to use our handwritten vows, but mine are in a notebook across several pages. I was wondering if there was a way to scan everything, extract the text, and put it all on one page. Here's to hoping this guide will help.
- loeg 6y agoYou could just write it out again by hand.
- Roritharr 6y agoIf it weren't HN i'd consider this snark, but here it's entirely possible this wasn't considered as the first option.
- yeswecatan 6y agoHa, it wasn't. It brings up an interesting point, though. Even though I'd scan and manipulate the original vows, I still feel that's a bit more special than simply re-writing them.
- michaelmrose 6y agoThis is tied to the absolute path of files in your home directory making it difficult to rebuild with say differing kerning values. It would be nice if it referred to relative paths. At least one path seems to be /home/sacha.local/lib when I assume it ought to be referring to /home/sacha/.local/lib It would be neat if it referred to relative paths within the repo even nicer if it if evaluating it installed needed python libraries locally so you could clone it. Open it in emacs. Modify. Eval buffer. Regarding kerning the only thing I think is really off is r followed by e example Here its not as noticeable with a smallish font but becomes more noticeable in a larger headline or title. I'm using it as the font for org headlines.
- sachac 6y agoHah, it's not really reproducible at this point, but I was so excited that I didn't want to wait until I got everything sorted out. I spent a little time last night kerning even more (it's surprisingly fun), so if the kerning at http://pages.sachachua.com/sachac-hand/files/test.html http://pages.sachachua.com/sachac-hand/files/test.html looks better for you, you can get the new font files from Github. Gosh, thanks for using the font right away! The local lib stuff is so that you can get aglfn.txt into the right place for the python library. I'll see if that can be given a path. If so, I can include it in files/.
- michaelmrose 6y agoThanks for the interesting project and for making it available immediately to play with.
- paulnechifor 6y agoI've always wanted to do this, but it only really works if you have a typeset handwriting style. Regular handwriting has too many "ligatures". For example consider just "vo" vs "io". The end of "v" ends horizontally near the top. "i" end at the bottom. So the line that starts "o" has to begin at different positions. Most fonts solve this by starting a discontinuous "o" always at the bottom. But this looks ugly. And that's jut two letter combinations...
- sachac 6y agoI tend to use print because it's easier for me to speed-read my sketchnotes that way, but I did come across a typography tutorial that explains how to do cursive connectors through variants. Maybe someday, if the kiddo starts learning cursive. :)
- billylo 6y agoWell done, Sacha!
- sachac 6y agoThanks!
- fish45 6y agoI did this sophomore year because my French teacher wanted things handwritten. I spent a lot of time making it fit on the lined paper and getting the color just right but I'm sure she figured it out anyway.
- watersb 6y agoThis was a cool thing to try when PostScript became more common, the release of the Apple LaserWriter printer [0]. I made a Type 1 font kind of like my handwriting. It's tedious but not super complicated. The real challenge is making something that doesn't look awful - hinting and ligatures and stuff. I might try it again. https://en.m.wikipedia.org/wiki/LaserWriter https://en.m.wikipedia.org/wiki/LaserWriter
- greggman3 6y agoThere have been sites that do this for you for 15-20yrs? A quick google finds these http://www.yourfonts.com/ http://www.yourfonts.com/ http://www.fontifier.com/ http://www.fontifier.com/
- sachac 6y agoTotally. I felt that generating and processing my own template with reference fonts and a custom letter order was an excellent reason to learn more Python, though!
- omgwtfbyobbq 6y agoThere's a 'Domestic Manners' font, apparently based on someone's handwriting, that I've used on and off for a while.
- rkagerer 6y agoI have an old Tablet PC that came with a program that did this. On a roadtrip one day a friend was bored and she stylused in all the letters. Her printing looks a bit like a child's and I've used that font a bunch of times now, on everything from kids menus to thank-you letters from my dog. I probably ought to pay her some royalties!