News for hackers. Stuff that matters.
Re:Sparks: A typeface for creating sparklines in text withou... by kaffeemitsahne on Wednesday May 06, 2020 @01:56PM (#23094203)
Re:Sparks: A typeface for creating sparklines in text withou... by antman on Thursday May 07, 2020 @04:48AM (#23101028)
Font looks great, license terms are expensive limiting per page views, or per installed server
Re:Sparks: A typeface for creating sparklines in text withou... by leephillips on Wednesday May 06, 2020 @02:40PM (#23094711)
This is great. I think we're just seeing the beginning of the crazy things that people are going to be doing by abusing (in the best possible sense) opentype.
Re:Sparks: A typeface for creating sparklines in text withou... by pjs_ on Wednesday May 06, 2020 @09:58PM (#23098831)
I use things like this and FontAwesome etc. a bunch, and they no doubt solve a real problem. But I also sort of wish that the problem were solved in a way that does not involve stuffing things that are not even remotely text into a font.

It seems like there should be a generic way to say "put image X (SVG, PNG, whatever) on the screen here, as if it were a glyph, and also do scaling and linebreaks and alignment properly, oh and colors and so on". I expect this already exists somewhere deep inside CSS - does anyone know the story?

Re:Sparks: A typeface for creating sparklines in text withou... by dmitrygr on Wednesday May 06, 2020 @10:26PM (#23099019)
<img src="img.svg" style="height: 1em; display: inline; vertical-align: bottom;" />
Re:Sparks: A typeface for creating sparklines in text withou... by jbverschoor on Wednesday May 06, 2020 @10:38PM (#23099092)
Baseline
Re:Sparks: A typeface for creating sparklines in text withou... by hanniabu on Wednesday May 06, 2020 @10:45PM (#23099133)
Interlinked
Re:Sparks: A typeface for creating sparklines in text withou... by sjbrown on Wednesday May 06, 2020 @01:59PM (#23094241)
We already have some rough glyphs for this: Unicode: 9601, 9602, 9603, 9604, 9605, 9606, 9607, 9608
Re:Sparks: A typeface for creating sparklines in text withou... by michaelmior on Wednesday May 06, 2020 @02:43PM (#23094760)
While these can be helpful, I'm not sure how widespread the availability is so you would probably want to provide these glyphs anyway. (I could be wrong here. But I also don't know a good way to assess their availability.) It's also quite nice that you can just type in data with Sparks and get sparklines which isn't possible with the glyphs you mentioned.
Re:Sparks: A typeface for creating sparklines in text withou... by swyx on Wednesday May 06, 2020 @03:21PM (#23095166)
is there a resource to assess unicode glyph availability across devices? something like a caniuse?
Re:Sparks: A typeface for creating sparklines in text withou... by jfim on Wednesday May 06, 2020 @02:38PM (#23094690)
9601-9608 decimal, so U+2581 [0] to U+2588 [1]. They're a bit wide for a sparkline though.

[0] https://codepoints.net/U+2581

[1] https://codepoints.net/U+2588

Re:Sparks: A typeface for creating sparklines in text withou... by ken on Wednesday May 06, 2020 @03:26PM (#23095215)
Any environment I have that does custom fonts and glyph substitution also has CSS (or similar functionality) which can be used to make them thinner, if desired.

5.2 MB (compressed) is a big package just for some narrower boxes.

Re:Sparks: A typeface for creating sparklines in text withou... by yohannparis on Wednesday May 06, 2020 @04:37PM (#23095993)
5.2 MB is for the whole set, if you are using this font in a project, you will most likely set on one type of font format (.eof, etc.) and one weight (extra-thin, bold.)

The font file ranges from 18Kb to ~600kb, with most in the ~50kb, which is reasonable for the simplicity.

Re:Sparks: A typeface for creating sparklines in text withou... by ken on Friday May 08, 2020 @12:22AM (#23111357)
Fair point, but I disagree about even that size being reasonable -- or simple.

There's a million things you can implement as a font. I have yet to see anything I think is a good idea to implement as a font except the defined glyph shapes themselves.

Re:Sparks: A typeface for creating sparklines in text withou... by Lammy on Wednesday May 06, 2020 @03:54PM (#23095546)
It would be cool for the Readme to explain (without having to click through to the website) what a sparkline is for those like me who have no idea :)
Re:Sparks: A typeface for creating sparklines in text withou... by divbzero on Wednesday May 06, 2020 @08:38PM (#23098292)
A small inline graph! Popularized and named by Edward Tufte. [1]

[1]: https://en.wikipedia.org/wiki/Sparkline

Re:Sparks: A typeface for creating sparklines in text withou... by Invictus0 on Wednesday May 06, 2020 @02:13PM (#23094419)
> See it working on our website or in one of our interactive notebook examples

Just a note, the website link is 404'd.

Re:Sparks: A typeface for creating sparklines in text withou... by jfim on Wednesday May 06, 2020 @02:40PM (#23094708)
Apparently the consultancy that built this closed their doors in February of this year.

> On February 25th, after a decade of business, we’ll be closing After the Flood to focus on other projects. We’d like to thank all of our clients and collaborators for their support.

Re:Sparks: A typeface for creating sparklines in text withou... by kevincox on Wednesday May 06, 2020 @02:28PM (#23094583)
An interesting, but possibly not useful feature is that you can copy the datapoints very easily.
Re:Sparks: A typeface for creating sparklines in text withou... by njharman on Wednesday May 06, 2020 @06:02PM (#23096861)
I'd say that is super useful as someone who

1) cuts and pastes into plain text files often

2) often wishes to take data from charts and munge it, although sparklines are probably too informationally sparse to bother.

Re:Sparks: A typeface for creating sparklines in text withou... by swyx on Wednesday May 06, 2020 @03:34PM (#23095308)
i was gonna ask how but then i tried it... very cool! i agree not very useful unless you want to do manual translation haha
Re:Sparks: A typeface for creating sparklines in text withou... by keithnz on Wednesday May 06, 2020 @10:17PM (#23098960)
only problem is the data is scaled to 0-100 so you won't know the real values
Re:Sparks: A typeface for creating sparklines in text withou... by flobosg on Thursday May 07, 2020 @01:40AM (#23100047)
Reminds me of this script to generate sparklines in the command line:

https://github.com/holman/spark

Re:Sparks: A typeface for creating sparklines in text withou... by jbverschoor on Wednesday May 06, 2020 @10:41PM (#23099106)
It’s 5mb zipped man. That’s almost twice the size of chrono trigger
Re:Sparks: A typeface for creating sparklines in text withou... by h-cobordism on Thursday May 07, 2020 @02:02AM (#23100150)
Luckily the WOFF2 itself is only around 18KB.

It still seems like an inferior solution to just using SVG, but it's not insanely bulky.

Re:Sparks: A typeface for creating sparklines in text withou... by arduinomancer on Wednesday May 06, 2020 @04:49PM (#23096123)
Can someone explain the advantage of doing this via text?
Re:Sparks: A typeface for creating sparklines in text withou... by mattlondon on Wednesday May 06, 2020 @04:58PM (#23096207)
A couple of things that spring to mind:

- super simple: no need to integrate a charting library or do server-side rendering

- performance: if you have a table of hundreds of rows each with a sparkline chart (e.g CPU load/QPS/error rate/etc for many nodes etc in a cluster), just some text will be hugely more performant that 100x charting widgets or 100x server-side rendered images.

Re:Sparks: A typeface for creating sparklines in text withou... by philjohn on Wednesday May 06, 2020 @05:19PM (#23096437)
Also gracefully degrades if the font isn't available for whatever reason, you'd see:

{0, 10, 20, 30, 40, 50, 60, 70, 80, 90}

Re:Sparks: A typeface for creating sparklines in text withou... by amelius on Wednesday May 06, 2020 @07:30PM (#23097714)
No advantage unless you enjoy solving problems in the least generic and least portable way.
Re:Sparks: A typeface for creating sparklines in text withou... by einpoklum on Wednesday May 06, 2020 @05:47PM (#23096704)
Not really, because the font on HN comments can't be set to Sparks...
Re:Sparks: A typeface for creating sparklines in text withou... by ohazi on Wednesday May 06, 2020 @06:44PM (#23097282)
Does anyone know if Pango will render this? Could be a nice way to build i3bar widgets.
Re:Sparks: A typeface for creating sparklines in text withou... by severak_cz on Wednesday May 06, 2020 @07:13PM (#23097554)