9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Antialised TrueType fonts
@ 2025-01-17 20:15 Paul Lalonde
  2025-01-17 21:25 ` Ron Minnich
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Lalonde @ 2025-01-17 20:15 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


[-- Attachment #1.1: Type: text/plain, Size: 1554 bytes --]

I've made a modification to truetypefs to do what ttfrender does: render
the font at higher resolution and filter down to a good looking 8 bit
font.
This is a significant improvement in the appearance of the fonts from
truetypefs, as seen in the image below.  Left is the one-bit font, right is
the filtered font.
[image: image.png]
Before I send a PR, I have questions.
I believe in being opinionated: the 8 bit version is so much better for
every font I've compared that I don't see any use for the 1 bit versions
anymore.
How do other users feel about ditching the 1 bit code path and having only
the 8 bit code path?  This is the cleanest/smallest change.
The alternatives would be to have a switch to truetypefs so that it always
returns either 1 bit or 8 bit fonts; a switch in the fs setup to choose
based on font size; a way to tell the fs what font depth to return
(probably a hack like the font size now, very ugly).
The cost of the filtering is low in compute for smaller point sizes, but
starts to lag a bit at 30 point or so.  It probably also blurs out very
small sizes.  I don't know that anyone chooses TrueType fonts for text
under ~10pt however.  Although the 10 pt below absolutely shows a minor
problem with my font spacing that I'll need to fix.
[image: image.png]
Thoughts?
Paul

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T965561871d922464-M07a6b86616fb2f76fcdf5925
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #1.2: Type: text/html, Size: 2253 bytes --]

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 87669 bytes --]

[-- Attachment #3: image.png --]
[-- Type: image/png, Size: 20191 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] Antialised TrueType fonts
  2025-01-17 20:15 [9fans] Antialised TrueType fonts Paul Lalonde
@ 2025-01-17 21:25 ` Ron Minnich
  2025-01-18  9:24   ` Steve Simon
  0 siblings, 1 reply; 3+ messages in thread
From: Ron Minnich @ 2025-01-17 21:25 UTC (permalink / raw)
  To: 9fans


[-- Attachment #1.1: Type: text/plain, Size: 2257 bytes --]

I like the idea of ditching the 1 bit code path.

I wonder, is the use of 1 bit historical, going back to days of 1 bit
displays and small memory? Is there some reason it was ever used?

thanks

On Fri, Jan 17, 2025 at 12:16 PM Paul Lalonde <paul.a.lalonde@gmail.com>
wrote:

> I've made a modification to truetypefs to do what ttfrender does: render
> the font at higher resolution and filter down to a good looking 8 bit
> font.
> This is a significant improvement in the appearance of the fonts from
> truetypefs, as seen in the image below.  Left is the one-bit font, right is
> the filtered font.
> [image: image.png]
> Before I send a PR, I have questions.
> I believe in being opinionated: the 8 bit version is so much better for
> every font I've compared that I don't see any use for the 1 bit versions
> anymore.
> How do other users feel about ditching the 1 bit code path and having only
> the 8 bit code path?  This is the cleanest/smallest change.
> The alternatives would be to have a switch to truetypefs so that it always
> returns either 1 bit or 8 bit fonts; a switch in the fs setup to choose
> based on font size; a way to tell the fs what font depth to return
> (probably a hack like the font size now, very ugly).
> The cost of the filtering is low in compute for smaller point sizes, but
> starts to lag a bit at 30 point or so.  It probably also blurs out very
> small sizes.  I don't know that anyone chooses TrueType fonts for text
> under ~10pt however.  Although the 10 pt below absolutely shows a minor
> problem with my font spacing that I'll need to fix.
> [image: image.png]
> Thoughts?
> Paul
> *9fans <https://9fans.topicbox.com/latest>* / 9fans / see discussions
> <https://9fans.topicbox.com/groups/9fans> + participants
> <https://9fans.topicbox.com/groups/9fans/members> + delivery options
> <https://9fans.topicbox.com/groups/9fans/subscription> Permalink
> <https://9fans.topicbox.com/groups/9fans/T965561871d922464-M07a6b86616fb2f76fcdf5925>
>

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T965561871d922464-M5e188e94c62edb365ceedd7e
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #1.2: Type: text/html, Size: 2944 bytes --]

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 87669 bytes --]

[-- Attachment #3: image.png --]
[-- Type: image/png, Size: 20191 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] Antialised TrueType fonts
  2025-01-17 21:25 ` Ron Minnich
@ 2025-01-18  9:24   ` Steve Simon
  0 siblings, 0 replies; 3+ messages in thread
From: Steve Simon @ 2025-01-18  9:24 UTC (permalink / raw)
  To: 9fans


[-- Attachment #1.1: Type: text/html, Size: 3730 bytes --]

[-- Attachment #1.2: image.png --]
[-- Type: image/png, Size: 20191 bytes --]

[-- Attachment #1.3: image.png --]
[-- Type: image/png, Size: 87669 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-18 11:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-17 20:15 [9fans] Antialised TrueType fonts Paul Lalonde
2025-01-17 21:25 ` Ron Minnich
2025-01-18  9:24   ` Steve Simon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).