HNHacker News
TopNewBestAskShowJobs

california-og

725 karma · joined July 3, 2023

—Designer-in-residence (2025–26) at the Centre for Text Margins.

—Teaching at Aalto University in the Visual Communication Design program 2026–27.

My websites:

- https://heikkilotvonen.com/

- https://hlnet.neocities.org/

Email me at: hlotvonen@gmail.com

submissionscomments
california-og··on Font with Built-In Syntax Highlighting
I am using 11ty for the blog, and it works great, for now. But there's two reasons I don't like it:

1. I need to have two different versions of my site, dev and prod, which I find very restricting and fragile.

2. I don't like to rely on other people updating their npm packages just so I could publish static content. I've been burned too many times by abandoned npm packages or breaking changes.

california-og··on Font with Built-In Syntax Highlighting
That's genius, thank you!! I will have to try that tomorrow but I have a feeling it might just work : - )
california-og··on Font with Built-In Syntax Highlighting
There's this article on using css highlights for syntax highlighting:

https://frontendmasters.com/blog/syntax-highlighting-with-no...

california-og··on Font with Built-In Syntax Highlighting
I have been considering using php like that. It would solve most of my issues. The problem is that I would still like to use static hosts, like netlify or GitHub pages, and they don't support php...In addition I would have to run php on my local machine, where as I would prefer to just edit html with no setup necessary. But if anyone knows a good free host with php support, let me know!
california-og··on Font with Built-In Syntax Highlighting
Very nice! Simple but effective. Thanks for sharing.
california-og··on Font with Built-In Syntax Highlighting
(author) The problem is that the opentype "language" doesn't have loops or anything resembling regular expressions, where I could just tell it to sub everything between two characters. So, I could highlight text between quotes, but only up to a certain arbitary limit, so I chose not to implement that at all.

Or did I misunderstand your comment? Care to elaborate on your idea?

california-og··on Font with Built-In Syntax Highlighting
(author) Because then you're not adding syntax highlighting to the textarea, but to the div... I've done this before and it's janky, with many edge cases that require extra css fiddling. It's just not great. I would rather use a library like codemirror even in seemingly simple cases like that, but fortunately I don't have to anymore : - )
california-og··on Font with Built-In Syntax Highlighting
(Author) Sure, it depends on your requirements, what you want your syntax highlighter to do. I wouldn't use it as my coding font (in its current form at least). But just because a few words inside regular text could be highlighted, doesn't make the code that much less readable — in the context of code snippets on websites.
california-og··on Font with Built-In Syntax Highlighting
(Author) For specific keywords, yes, technically you could, but it would require making a separate glyph for each word, which would inflate the file size and require a lot of manual effort for no apparent upside. The substituting logic is as rigid as with calts. Unless you had some other idea how to use ligatures?
california-og··on Font with Built-In Syntax Highlighting
You are probably right, but I would like to see some actual benchmarks and tests. Unfortunately I didn't have time to do them myself yet, but I am curious what the difference between this, a basic font, and a highlighter script would be for a very large document.
california-og··on Font with Built-In Syntax Highlighting
And about the lookup rules: they are extremely simple. You can search for a single character at a time, or search from a group ("class") of characters. AFAIK, that's it. But if anyone knows better, I would be happy to be proven wrong.
california-og··on Font with Built-In Syntax Highlighting
I was informed that the color palette can be changed with `override-colors` css rule, but havent had time to update the blog post yet.
california-og··on Font with Built-In Syntax Highlighting
Ah, I think I meant to write that the site doesn't load anything from third parties, but apparently had a slight brain fart.
california-og··on Font with Built-In Syntax Highlighting
Yeah. Doing it all manually would take ages and be quite error prone. I did generate all the lookup rules with a script, just didn't think it important enough to mention in the blog post.
california-og··on Font with Built-In Syntax Highlighting
Definitely! For example, Glyphs has a decent python scripting API which could be used to automate the whole process. I used it for automatically assigning each layer the correct color attribute to save me some clicks. And I also generated all the calt lookup rules from a list of keywords.
california-og··on Font with Built-In Syntax Highlighting
Thank you! (I'm the author) I'm also very curious to know if there's some nifty way of improving the lookup logic. What I did was kind of a brute force method, but on the other hand, the CALT "language" is very limited.

For font editors, Glyphs is the industry standard, and, as far as I know, there are not many good alternatives. There's FontForge, but its contextual alternate editing seems even more confusing: https://fontforge.org/docs/ui/dialogs/contextchain.html

Just today I found out about a new browser based font editor, fontra, but it looks like editing OpenType features is still on its roadmap. Maybe something to keep an eye on though. https://fontra.xyz/

california-og··on ASCII 3D Renderer for JavaScript
ASCII just refers to the 7bit standard, so if we are pedantic ASCII art is just art using the printable characters of the 128 code points defined in it. Font size doesn't have anything to do with it. But ASCII art is used as an umbrella term, encompassing a variety of different standards, character sets and fonts. There are a bunch of square ASCII, like PETSCII, ATASCII and even PC ASCII can be rendered with a 8x8 cp437 font. We don't need to gatekeep what "qualifies" as ASCII art.
california-og··on The Elegance of the ASCII Table
While DEL didn't stamp a black square on typewriters, it sometimes did so (or something similar, like diagonal stripes) in various digital character sets. ISO 2047[0] established the graphical representations for the control characters of the 7-bit coded character set in 1975, maily for debugging reasons. This graphical representation for DEL was used by Apple IIGS, TRS-80 and even Amiga!

[0]: https://en.m.wikipedia.org/wiki/ISO_2047

california-og··on HSL: An Intuitive Way to Represent Color in CSS
For me HSL is not intuitive at all. I always struggle to remember what hue of each colour is. I would even say that rgb is still the most intuitive for picking a particular color hue, but of course HSL or the newer ones like oklch are much better at picking matching saturation and lightness levels.
california-og··on Flow Charts with CSS Anchor Positioning
This is probably coming to CSS in the coming years. [0] Which makes me very excited for one reason: CSS is nearing feature parity (and surpassing it in some areas) with Adobe InDesign, so we can finally ditch adobe and just make print publications within the browser. The only other thing missing after custom colour profiles is a proper text justification algorithm, although, for many, it's not so important because people are already used to reading ragged text.

[0]: https://www.w3.org/TR/css-color-4/#color-space

california-og··on Ask HN: Google Search is completely unusable. How do you work around it?
There's one surprising way I still find a lot of great material on Google, which works especially for niche research topics, is to view Image results. I click on any interesting image in the results and then I check the site it's from. Many times I've found super interesting stuff that would not appear in the first pages of text results.
california-og··on Teranoptia – a typeface that allows you to imagine chimeric creatures
The author of the font made it also Glyph Drawing Club "compatible", which is a modular shape builder I've built that works with font files. You can just drag and drop an otf or ttf file on the app window and it'll load the glyphs as svg shapes to draw with. The neat thing is that it works in two dimensions, and you can also rotate (with r hotkey) or invert (with i hotkey) the glyphs, and output the drawing as SVG or PNG.

https://glyphdrawing.club

california-og··on Why is simple decoration so rare in recent work?
The author is partly right on the right that it was a cultural response to war.

Here's a relevant excerpt from the book Dutch Graphic Design, A century of innovation. (2006. P. 76-81).

"De Stijl was one of many critical intellectual responses to the calamity of World War I. [...] This aim was implicit in De Stijl's first manifesto, published in 1918:

'There is an old and a new awareness of time. The old is based on the individual. The new is based on the universal. The struggle of the individual against the universal is manifesting itself in the World War as well as in contemporary art.... The war is destroying the old world with its contents; the dominance of the individual in every sector.'

In 1921 a similar sentiment followed in the fourth volume of De Stijl:

'For Europe there is no longer any way out. Centralization and property, spiritual and material individualism was the foundation of the old Europe. In that it has caged itself. It is falling to pieces. We observe this calmly. We would not want to help even if we could. We do not want to extend the life of this old prostitute.'

De Stijl advocated an idealistic goal to liberate art from nonessential and outdated qualities such as subject matter, naturalism, subjectivity, and decoration. Its diverse advocates rejected outright what they saw as the sentimentalism and degeneration of the nineteenth century. They expressed a desire for a new rational art that better suited the modern world, a 'collective impersonal style.... destined, they felt, for adoption by architects and designers of the machine age." They were not, however, a 'lost generation'; instead they enthusiastically espoused a new industry-based culture. In order to meet the needs of a new epoch, the members of De Stijl advocated a revision of old understandings of beauty which had been based solely on craft. They realized that twentieth-century technology could be utilized to create a union of art and industry. In October 1917 Van Doesburg wrote in the first issue of De Stijl:

'It is the endeavor of this small magazine to make a contribution toward the development of a new consciousness of beauty. It desires to make modern man receptive to what is new in the plastic arts. It desires, as opposed to anarchy and confusion, the 'modern baroque, to establish a mature style based on pure relationship of the spirit of the age and expressive means. It desires to combine in itself contemporary ideas on the new plasticity, which, although fundamentally the same, developed independently from one another.'"

Similar thoughts were shared in most artistic and other cultural movements of the time. However, how this managed to be so successful is rarely analysed. My hypothesis is this: these kinds of anti-ornament movements were advocated by both socialist and capitalists. For socialists mass-produced functional goods meant that everyone could have equal amounts of decent quality stuff. For capitalists it meant the opportunity to increase the surplus value of goods when productive time wasn't "wasted" on inefficient ornamentation.

For both—socialists and capitalists—ornamentation was an obstacle. They wanted a complete cultural shift, where by devaluing tradition, craft and ornamentation, people could br untied from their locality like their home, village, town etc., and thus much easier relocated to new industrial areas (like big cities). Mass produced goods meant that you could move and simply buy fresh new things (because they were cheap). It also meant that you weren't attached to your things (like you would if you spent time on crafting them yourself), so it didn't matter if they were beautiful, they just had to work.

california-og··on Drawing and illustrating in the pre-digital time (2019)
Are there any digital tools that would replicate the workflow of drawing with ruler and compass? I've tried dozens of different apps but none of them get it quite right. Here's my wishlist:

Compass:

— Set a radius and "lock" it in place.

— Move the origin of the compass anywhere, without having to set the radius again.

— Press down to draw an arc (CW or CCW), starting and ending anywhere along the radius.

— Ability to snap to other lines and intersections.

— Hotkey to draw in increments, like 10°, 20°, 30°, 45° etc.

— Ability to draw the arcs as guides to aid in geometric construcion.

Ruler:

— Change the angle of the ruler

— Move the ruler without having to set the angle again

— Press down to draw a line, starting and ending anywhere along the ruler.

— Ability to snap to other lines and intersections.

— Hotkey to rotate in increments of 10°, 20°, 30°, 45° etc.

— Ability to draw the lines as guides to aid in geometric construcion.

+ A fill tool to color shapes.

california-og··on RFC 9518 – What can internet standards do about centralisation?
Can you explain or give advice on how one would self-host?

In my country none of the main ISPs offer static IPs. They're only available to businesses.

Self-hosting with a dynamic IP seems difficult if not impossible. There are some dynamic DNS services but that kinda defeats the self-hosted part.

california-og··on Amiga ASCII Art
Good eye! I can't remember what was my initial inspiration (could have been the one you linked), but there is also a very similiar character in Pitman's typewriter manual (1893) which is featured in Barrie Tullett's Typewriter Art: A Modern Anthology.

https://twitter.com/readermeter/status/570459976759676928

california-og··on Fleuron (typography)
Any complex combination or arrangement of fleurons or other type ornament is not really possible with any contemporary word processor for one good reason: type is not set by hand anymore. Precise but free placement of glyphs is tedious if not impossible. It would require a whole new paradigm of setting type, one that would be based on modularity and strict typographic measurement system. A digital letterpress system if you will. The closest we've had that digitally was probably textmode and ASCII art.
california-og··on Hey, computer, make me a font
I think that would be ideal. The 'killer' feature would be: Handcraft a set of control characters, like the letters in "handglove" and then let AI generate the rest. Designing a typeface is fun, until you need to add support for multiple languages and need to make 800+ characters. Or, maybe there is a nice (open source) font, that is unfortunately missing some characters you really need: let AI generate them.
← PreviousPage 3 of 3