9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] problem using a vera font in rio
@ 2010-02-14 11:21 Rudolf Sykora
  2010-02-14 18:34 ` erik quanstrom
  0 siblings, 1 reply; 26+ messages in thread
From: Rudolf Sykora @ 2010-02-14 11:21 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 361 bytes --]

When I use vera/unicode.12.font for either acme or rio (see the
screenshot attached) and I write e.g. 'troff', then I move in front of
'troff', write something there, say 'mv', 'space', and move the mouse
cursor away by clicking e.g. at the end of the line, the 't' letter of
the 'troff' word is not correctly displayed.

What causes this?
Thanks
Ruda

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

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

* Re: [9fans] problem using a vera font in rio
  2010-02-14 11:21 [9fans] problem using a vera font in rio Rudolf Sykora
@ 2010-02-14 18:34 ` erik quanstrom
  2010-02-14 19:09   ` Rudolf Sykora
  0 siblings, 1 reply; 26+ messages in thread
From: erik quanstrom @ 2010-02-14 18:34 UTC (permalink / raw)
  To: 9fans

> When I use vera/unicode.12.font for either acme or rio (see the
> screenshot attached) and I write e.g. 'troff', then I move in front of
> 'troff', write something there, say 'mv', 'space', and move the mouse
> cursor away by clicking e.g. at the end of the line, the 't' letter of
> the 'troff' word is not correctly displayed.
>
> What causes this?

it turns out that neither the 'm' nor the space trigger this problem.
the problem lies with 'v'.

i wrote a little program to dump Cacheinfo/Fontchar information.
i copied the source an executable (capable of 32-bit runes) to sources:
/n/sources/contrib/quanstro/^(fontchr fontchr.c)

it appears that v's left takes on an unexpected value.  note the
value of left for the vera font:

; char=v {8.out $char; 8.out -f /lib/font/bit/vera/vera.14.font $char}
sfname /lib/font/bit/cyberbit/cyberbit.14.0000
	Cacheinfo	x 6 w 6 left 0 v 000076
	Fontchar	x 582 top 4 bottom 11 left 0 width 6
sfname /lib/font/bit/vera/vera.14.0020
	Cacheinfo	x 10 w 7 left -1 v 000076
	Fontchar	x 639 top 5 bottom 13 left -1 width 7

i would suspect that this is a fault in ttf2subf.

the definitions in subfont(2) notwithstanding, it's not clear to
me that a value of -1 is necessarily bogus.  consider an antialiased
font with a character like 'v'.  the top left edge of the v should be
shaded to the left.  if the top left edge of the font is at x=0, then
antialiasing would leave our character box and bleed into the previous
one.  this would lead to surprising values of Fontchar->left.

likewise, i think that ttf2subf could set Fontinfo->width greater than
Cacheinfo->x.

- erik



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

* Re: [9fans] problem using a vera font in rio
  2010-02-14 18:34 ` erik quanstrom
@ 2010-02-14 19:09   ` Rudolf Sykora
  2010-02-14 19:52     ` Federico G. Benavento
  2010-02-15  4:15     ` erik quanstrom
  0 siblings, 2 replies; 26+ messages in thread
From: Rudolf Sykora @ 2010-02-14 19:09 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> likewise, i think that ttf2subf could set Fontinfo->width greater than
> Cacheinfo->x.
>
> - erik
>

And is it just my problem I can't find the source of ttf2subf?
(It seems that although the package ttf2subf installs the 386 binary
and a man page, the sys/src/cmd/ttf2subf directory is empty...)

Ruda



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

* Re: [9fans] problem using a vera font in rio
  2010-02-14 19:09   ` Rudolf Sykora
@ 2010-02-14 19:52     ` Federico G. Benavento
  2010-02-15  4:15     ` erik quanstrom
  1 sibling, 0 replies; 26+ messages in thread
From: Federico G. Benavento @ 2010-02-14 19:52 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I think ttf2subf was written by lucho, the code is in andrey's
site http://mirtchovski.com/p9/freetype/

the binary in my contrib is a modified version of that one
so it was compiled with ape's freetype, which involved
also having libmemdraw for ape, I lost the code when
I moved to another country in 2008...

On Sun, Feb 14, 2010 at 5:09 PM, Rudolf Sykora <rudolf.sykora@gmail.com> wrote:
>> likewise, i think that ttf2subf could set Fontinfo->width greater than
>> Cacheinfo->x.
>>
>> - erik
>>
>
> And is it just my problem I can't find the source of ttf2subf?
> (It seems that although the package ttf2subf installs the 386 binary
> and a man page, the sys/src/cmd/ttf2subf directory is empty...)
>
> Ruda
>
>



--
Federico G. Benavento



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

* Re: [9fans] problem using a vera font in rio
  2010-02-14 19:09   ` Rudolf Sykora
  2010-02-14 19:52     ` Federico G. Benavento
@ 2010-02-15  4:15     ` erik quanstrom
  2010-02-16  3:39       ` Russ Cox
  1 sibling, 1 reply; 26+ messages in thread
From: erik quanstrom @ 2010-02-15  4:15 UTC (permalink / raw)
  To: 9fans

> And is it just my problem I can't find the source of ttf2subf?
> (It seems that although the package ttf2subf installs the 386 binary
> and a man page, the sys/src/cmd/ttf2subf directory is empty...)

a p9p version of ttf2subf is in /n/sources/contrib/quanstro/ttf2subf

i've been able to fix the reported problem just by compiling against
a newer version of freetype and reconverting the vera font.  it's
completely unclear to me if this is a change in freetype, vera, or
something else.

there are two related bugs that are not fixed by reconversion.
using vera,

1.  type vj.  notice that the right arm of the v gets chopped off.
(boys and girls, keep your hands inside moving vehicles!)

2.  select the j just typed and cut it.  now move the tick
somplace out.  notice the grey goo left behind.

the second can be "fixed" by having ttf2subf by clamping right at 0.
this is wrong, since we're just chopping off the tail of the j.
one can get a feel for what's going wrong by looking at the first
problem.

consider the string vera itself.  you'll notice that the v is placed so
it overlaps the e.  this looks great, but it violates the unwarranted
(and most likely unintended) assumption — that characters live
inside bounding boxes.

this assumption is partially due to the fact that stringbg is used
by libframe to avoid α² problems when redrawing, and to avoid
severe performance penalities for fonts of depth>1.  frame
buffers are slow.

but even without using stringbg, things still don't look right.
(try a little highlighting with a ca. 2006 rio.)

i haven't had a chance to think this through, but naïvely, one
would think that also drawing adjacent characters and clipping
would solve the problem via the use a bigger hammer technique.

- erik



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

* Re: [9fans] problem using a vera font in rio
  2010-02-15  4:15     ` erik quanstrom
@ 2010-02-16  3:39       ` Russ Cox
  2010-02-16  4:35         ` erik quanstrom
  0 siblings, 1 reply; 26+ messages in thread
From: Russ Cox @ 2010-02-16  3:39 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Or you could use a non-ugly font.

Russ


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

* Re: [9fans] problem using a vera font in rio
  2010-02-16  3:39       ` Russ Cox
@ 2010-02-16  4:35         ` erik quanstrom
  2010-02-16  4:57           ` andrey mirtchovski
  0 siblings, 1 reply; 26+ messages in thread
From: erik quanstrom @ 2010-02-16  4:35 UTC (permalink / raw)
  To: 9fans

On Mon Feb 15 22:42:21 EST 2010, rsc@swtch.com wrote:
> Or you could use a non-ugly font.

helvetica has the similar properties, especially in reasonable point
sizes for programming.  if antialiased, the fs would run together.

http://www.linotype.com/526/helvetica-family.html?PHPSESSID=21f2dcac2d82c8a33f687cfb59ed88f3&subviewmode=FONTS&samplestr=vera+ffi

i hope you never need italic.  :-)

- erik



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

* Re: [9fans] problem using a vera font in rio
  2010-02-16  4:35         ` erik quanstrom
@ 2010-02-16  4:57           ` andrey mirtchovski
  2010-02-16  5:07             ` erik quanstrom
                               ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: andrey mirtchovski @ 2010-02-16  4:57 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

perhaps this article could be of interest to this discussion. it only
considers fixed-width fonts but is worth a look if you're looking for
better fonts:

http://hivelogic.com/articles/top-10-programming-fonts

I have not attempted to convert any of these fonts to rio/acme. If you
do I'd love to see the results posted here.

Myself, I'm stuck with Monaco. Anti-aliased in the editor, aliased in
a terminal.



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

* Re: [9fans] problem using a vera font in rio
  2010-02-16  4:57           ` andrey mirtchovski
@ 2010-02-16  5:07             ` erik quanstrom
  2010-02-16  6:58             ` Skip Tavakkolian
  2010-02-17 16:31             ` Ethan Grammatikidis
  2 siblings, 0 replies; 26+ messages in thread
From: erik quanstrom @ 2010-02-16  5:07 UTC (permalink / raw)
  To: 9fans

> Myself, I'm stuck with Monaco. Anti-aliased in the editor, aliased in
> a terminal.

at least that's better than a monacle.

it seems that you can have any two of the following
1.  free
2.  reasonable unicode coverage
3.  decent looking.
4.  doesn't need antialiasing.

(yes there are four.)

- erik



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

* Re: [9fans] problem using a vera font in rio
  2010-02-16  4:57           ` andrey mirtchovski
  2010-02-16  5:07             ` erik quanstrom
@ 2010-02-16  6:58             ` Skip Tavakkolian
  2010-02-17 16:31             ` Ethan Grammatikidis
  2 siblings, 0 replies; 26+ messages in thread
From: Skip Tavakkolian @ 2010-02-16  6:58 UTC (permalink / raw)
  To: 9fans

Syntax is a nice font for code;  i first saw it in Oberon,
though it predates Oberon.

http://en.wikipedia.org/wiki/Syntax_(typeface)

> perhaps this article could be of interest to this discussion. it only
> considers fixed-width fonts but is worth a look if you're looking for
> better fonts:
>
> http://hivelogic.com/articles/top-10-programming-fonts
>
> I have not attempted to convert any of these fonts to rio/acme. If you
> do I'd love to see the results posted here.
>
> Myself, I'm stuck with Monaco. Anti-aliased in the editor, aliased in
> a terminal.




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

* Re: [9fans] problem using a vera font in rio
  2010-02-16  4:57           ` andrey mirtchovski
  2010-02-16  5:07             ` erik quanstrom
  2010-02-16  6:58             ` Skip Tavakkolian
@ 2010-02-17 16:31             ` Ethan Grammatikidis
  2010-02-17 16:44               ` andrey mirtchovski
  2 siblings, 1 reply; 26+ messages in thread
From: Ethan Grammatikidis @ 2010-02-17 16:31 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


On 16 Feb 2010, at 04:57, andrey mirtchovski wrote:

> perhaps this article could be of interest to this discussion. it only
> considers fixed-width fonts but is worth a look if you're looking for
> better fonts:
>
> http://hivelogic.com/articles/top-10-programming-fonts
>
> I have not attempted to convert any of these fonts to rio/acme. If you
> do I'd love to see the results posted here.
>
> Myself, I'm stuck with Monaco. Anti-aliased in the editor, aliased in
> a terminal.
>
Bump the font size up by 1 in the terminal. Monaco stops being anti-
aliased at a far larger size than you'd expect.



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

* Re: [9fans] problem using a vera font in rio
  2010-02-17 16:31             ` Ethan Grammatikidis
@ 2010-02-17 16:44               ` andrey mirtchovski
  2010-02-25 21:45                 ` andrey mirtchovski
  0 siblings, 1 reply; 26+ messages in thread
From: andrey mirtchovski @ 2010-02-17 16:44 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> Bump the font size up by 1 in the terminal. Monaco stops being anti-aliased
> at a far larger size than you'd expect.

it's not anti-aliased on purpose.



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

* Re: [9fans] problem using a vera font in rio
  2010-02-17 16:44               ` andrey mirtchovski
@ 2010-02-25 21:45                 ` andrey mirtchovski
  2010-02-25 22:01                   ` erik quanstrom
  2010-02-25 23:08                   ` Russ Cox
  0 siblings, 2 replies; 26+ messages in thread
From: andrey mirtchovski @ 2010-02-25 21:45 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 722 bytes --]

speaking of fonts, i took the time today to convert a few of the
freely downloadable microsoft fonts (they come with some XML tool
package that is freely available on the net, i can dig it out if you
really want to know the source).

ttf2subf does have its issues and they do crop up more and more often
nowadays -- constantia cuts off characters at the bottom for example,
also i'm not really sure the size calculations are correct (-s 14
definitely doesn't match default font's size 14)  but there are a
couple of fonts that seem usable: consolas and calibri.

i want pretty fonts in acme, but i'm not sure ttf2subf will get us
there without major work (and a new port of the freetype libraries).

andrey

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

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

[-- Attachment #4: candara.png --]
[-- Type: image/png, Size: 99251 bytes --]

[-- Attachment #5: consolas.png --]
[-- Type: image/png, Size: 85089 bytes --]

[-- Attachment #6: constantia.png --]
[-- Type: image/png, Size: 75512 bytes --]

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

* Re: [9fans] problem using a vera font in rio
  2010-02-25 21:45                 ` andrey mirtchovski
@ 2010-02-25 22:01                   ` erik quanstrom
  2010-02-25 23:08                   ` Russ Cox
  1 sibling, 0 replies; 26+ messages in thread
From: erik quanstrom @ 2010-02-25 22:01 UTC (permalink / raw)
  To: 9fans

> i want pretty fonts in acme, but i'm not sure ttf2subf will get us
> there without major work (and a new port of the freetype libraries).

i've been running ttf2subf with the freetype appendage cut off.
i'm using the system library directly from p9p.  that seems to work better
than porting the whole freetype blob to plan 9 or carting around an
old copy of freetype.  (generally, i'd rather port to plan 9.)

unfortunately, i haven't made time to clean this version up enough
to stick out for public consumption.  yet.

i think the cutoff problem has to do with not extending the antialiasing
all the way down to the true bottom of the character.  i notice that the
ds were cut off, but not gs and ys at least in the last font.

- erik



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

* Re: [9fans] problem using a vera font in rio
  2010-02-25 21:45                 ` andrey mirtchovski
  2010-02-25 22:01                   ` erik quanstrom
@ 2010-02-25 23:08                   ` Russ Cox
  2010-02-25 23:36                     ` andrey mirtchovski
  1 sibling, 1 reply; 26+ messages in thread
From: Russ Cox @ 2010-02-25 23:08 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 283 bytes --]

an alternative is to use the p9p fontsrv to generate fonts.
here's acme with Calibri on OS X.

the glyphs are a little more washed out than in your
screen shot, but maybe it's easier to fix that than to
keep working on ttf2subf.  maybe not, but either way
it's there.

russ

[-- Attachment #2: Picture 1.png --]
[-- Type: image/png, Size: 95788 bytes --]

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

* Re: [9fans] problem using a vera font in rio
  2010-02-25 23:08                   ` Russ Cox
@ 2010-02-25 23:36                     ` andrey mirtchovski
  2010-02-26  2:11                       ` Russ Cox
  0 siblings, 1 reply; 26+ messages in thread
From: andrey mirtchovski @ 2010-02-25 23:36 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> an alternative is to use the p9p fontsrv to generate fonts.
> here's acme with Calibri on OS X.

that may be a good solution for p9p's acme. i admit i hadn't looked at it.

> the glyphs are a little more washed out than in your
> screen shot, but maybe it's easier to fix that than to
> keep working on ttf2subf.  maybe not, but either way
> it's there.

I am curious why the difference in rendering. in your screenshot 't',
'f' and 'g' look especially blurry. subpixel rendering?

what font works well for go programming in acme nowadays? what do you
use? (doesn't matter if it's variable width)



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

* Re: [9fans] problem using a vera font in rio
  2010-02-25 23:36                     ` andrey mirtchovski
@ 2010-02-26  2:11                       ` Russ Cox
  2010-02-26  2:43                         ` erik quanstrom
  0 siblings, 1 reply; 26+ messages in thread
From: Russ Cox @ 2010-02-26  2:11 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1572 bytes --]

On Thu, Feb 25, 2010 at 3:36 PM, andrey mirtchovski
<mirtchovski@gmail.com> wrote:
>> an alternative is to use the p9p fontsrv to generate fonts.
>> here's acme with Calibri on OS X.
>
> that may be a good solution for p9p's acme. i admit i hadn't looked at it.

it could be a general solution - fontsrv just spits out
ordinary font files that you could use on plan 9.

>> the glyphs are a little more washed out than in your
>> screen shot, but maybe it's easier to fix that than to
>> keep working on ttf2subf.  maybe not, but either way
>> it's there.
>
> I am curious why the difference in rendering. in your screenshot 't',
> 'f' and 'g' look especially blurry. subpixel rendering?

i don't know.  it's not libfreetype.  fontsrv asks the OS X
graphics code to render each glyph into a box and then
concatenates the boxes to make the subfont.
all the text was noticeably lighter (more grey)
than in your screen shot when i put them side by side.

> what font works well for go programming in acme nowadays? what do you
> use? (doesn't matter if it's variable width)

i still use /lib/font/bit/lucsans/euro.8.font
and it works great.  i just can't get used to how fuzzy
and grey the supposedly "better" fonts are.
when you put them side by side there's just no
comparison for contrast and readability.
the attached picture is a 9term and an OS X terminal
using lucm/unicode.9.font and Lucida Sans Typewriter 15pt,
respectively.  it's easy to forget that the fuzzy fonts are
so fuzzy until you see a side by side comparison.

russ

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

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

* Re: [9fans] problem using a vera font in rio
  2010-02-26  2:11                       ` Russ Cox
@ 2010-02-26  2:43                         ` erik quanstrom
  2010-02-26  2:53                           ` Ethan Grammatikidis
                                             ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: erik quanstrom @ 2010-02-26  2:43 UTC (permalink / raw)
  To: 9fans

> it could be a general solution - fontsrv just spits out
> ordinary font files that you could use on plan 9.

ttf2subf is only about 150 lines of code, once liberated from
libfreetype.

> > I am curious why the difference in rendering. in your screenshot 't',
> > 'f' and 'g' look especially blurry. subpixel rendering?
>
> i don't know.  it's not libfreetype.  fontsrv asks the OS X
> graphics code to render each glyph into a box and then
> concatenates the boxes to make the subfont.
> all the text was noticeably lighter (more grey)
> than in your screen shot when i put them side by side.

this is due to apple's algorithm for rendering glyphs.
with freetype, if you get a purely vertical or horizontal
stroke that is pixel-aligned, then you get no grey fuzz.
with apple's algorithm, you will get grey fuzz.  overall,
the color density is more even with the apple algorithm,
but it results in many more grey pixels.  you can use the
built-in screen magnifier to see this.

i tend to like subpixel rendering, even the fuzz problem.
(i don't have an opinion on apple's algorithm.  i don't have one.)
this is because i use fonts small enough that the fuzz is
hard to see and a non antialised font looks poor.  the
font i use (/lib/font/bit/cyberbit/mod14.font) is about the
same pitch as /lib/font/bit/lucidasans/unicode.7.font.

maybe i just need better contacts :-).

- erik



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

* Re: [9fans] problem using a vera font in rio
  2010-02-26  2:43                         ` erik quanstrom
@ 2010-02-26  2:53                           ` Ethan Grammatikidis
  2010-03-02 16:49                             ` [9fans] int errno / errno.h patch EBo
  2010-02-26 14:01                           ` [9fans] problem using a vera font in rio matt
  2010-03-08 18:42                           ` Albert Skye
  2 siblings, 1 reply; 26+ messages in thread
From: Ethan Grammatikidis @ 2010-02-26  2:53 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


On 26 Feb 2010, at 02:43, erik quanstrom wrote:

>> it could be a general solution - fontsrv just spits out
>> ordinary font files that you could use on plan 9.
>
> ttf2subf is only about 150 lines of code, once liberated from
> libfreetype.
>
>>> I am curious why the difference in rendering. in your screenshot
>>> 't',
>>> 'f' and 'g' look especially blurry. subpixel rendering?
>>
>> i don't know.  it's not libfreetype.  fontsrv asks the OS X
>> graphics code to render each glyph into a box and then
>> concatenates the boxes to make the subfont.
>> all the text was noticeably lighter (more grey)
>> than in your screen shot when i put them side by side.
>
> this is due to apple's algorithm for rendering glyphs.
> with freetype, if you get a purely vertical or horizontal
> stroke that is pixel-aligned, then you get no grey fuzz.
> with apple's algorithm, you will get grey fuzz.  overall,
> the color density is more even with the apple algorithm,
> but it results in many more grey pixels.  you can use the
> built-in screen magnifier to see this.

I find Apple's easier to read, curiously enough. Perhaps those who
don't could use fontsrv from an X11 build of p9p.

>
> i tend to like subpixel rendering, even the fuzz problem.
> (i don't have an opinion on apple's algorithm.  i don't have one.)
> this is because i use fonts small enough that the fuzz is
> hard to see and a non antialised font looks poor.  the
> font i use (/lib/font/bit/cyberbit/mod14.font) is about the
> same pitch as /lib/font/bit/lucidasans/unicode.7.font.
>
> maybe i just need better contacts :-).
>
> - erik
>




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

* Re: [9fans] problem using a vera font in rio
  2010-02-26  2:43                         ` erik quanstrom
  2010-02-26  2:53                           ` Ethan Grammatikidis
@ 2010-02-26 14:01                           ` matt
  2010-02-26 16:37                             ` david bulkow
  2010-03-08 18:42                           ` Albert Skye
  2 siblings, 1 reply; 26+ messages in thread
From: matt @ 2010-02-26 14:01 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


>>i don't know.  it's not libfreetype.  fontsrv asks the OS X
>>graphics code to render each glyph into a box and then
>>concatenates the boxes to make the subfont.
>>all the text was noticeably lighter (more grey)
>>than in your screen shot when i put them side by side.
>>
>>
>
>this is due to apple's algorithm for rendering glyphs.
>
I don't know if it is relevant but OSX uses a 1.8 Gamma whereas PC's (&
TVs) use 2.2



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

* Re: [9fans] problem using a vera font in rio
  2010-02-26 14:01                           ` [9fans] problem using a vera font in rio matt
@ 2010-02-26 16:37                             ` david bulkow
  0 siblings, 0 replies; 26+ messages in thread
From: david bulkow @ 2010-02-26 16:37 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 636 bytes --]

Apple has switched to the 2.2 Gamma.  Don't know when though, probably the
10.5 or 10.6 era.

On Fri, Feb 26, 2010 at 9:01 AM, matt <maht-9fans@maht0x0r.net> wrote:

>
>  i don't know.  it's not libfreetype.  fontsrv asks the OS X
>>> graphics code to render each glyph into a box and then
>>> concatenates the boxes to make the subfont.
>>> all the text was noticeably lighter (more grey)
>>> than in your screen shot when i put them side by side.
>>>
>>>
>>
>> this is due to apple's algorithm for rendering glyphs.
>>
>>  I don't know if it is relevant but OSX uses a 1.8 Gamma whereas PC's (&
> TVs) use 2.2
>
>

[-- Attachment #2: Type: text/html, Size: 1245 bytes --]

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

* [9fans] int errno / errno.h patch
  2010-02-26  2:53                           ` Ethan Grammatikidis
@ 2010-03-02 16:49                             ` EBo
  2010-03-03  5:15                               ` Russ Cox
  0 siblings, 1 reply; 26+ messages in thread
From: EBo @ 2010-03-02 16:49 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


While working on gentoo ebuilds for plan9port, glendix, etc., I came across a
patch in Powerman's portage overlay for plan9port.

===============================
--- plan9/src/cmd/9660srv/main.c.orig	2009-12-11 19:18:18.000000000 +0200
+++ plan9/src/cmd/9660srv/main.c	2009-12-11 19:18:43.000000000 +0200
@@ -38,7 +38,7 @@
 uchar mdata[Maxiosize];
 char fdata[Maxfdata];
 uchar statbuf[STATMAX];
-int errno;
+#include <errno.h>


 extern Xfsub	*xsublist[];
===============================

should the base source include this patch?

  Best regards,

  EBo --



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

* Re: [9fans] int errno / errno.h patch
  2010-03-02 16:49                             ` [9fans] int errno / errno.h patch EBo
@ 2010-03-03  5:15                               ` Russ Cox
  2010-03-03 14:02                                 ` EBo
  0 siblings, 1 reply; 26+ messages in thread
From: Russ Cox @ 2010-03-03  5:15 UTC (permalink / raw)
  To: ebo, Fans of the OS Plan 9 from Bell Labs

It looks like deleting errno from that program
would be an even better fix.

Russ


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

* Re: [9fans] int errno / errno.h patch
  2010-03-03  5:15                               ` Russ Cox
@ 2010-03-03 14:02                                 ` EBo
  2010-03-03 17:59                                   ` Charles Forsyth
  0 siblings, 1 reply; 26+ messages in thread
From: EBo @ 2010-03-03 14:02 UTC (permalink / raw)
  To: Russ Cox, ebo, Fans of the OS Plan 9 from Bell Labs

Russ Cox <rsc@swtch.com> said:

> It looks like deleting errno from that program
> would be an even better fix.

Hmmm... you are right.  All it does is set it to 0 and never uses it...

But for future reference should errno.h be used in Plan 9 programms or not?

  EBo --


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

* Re: [9fans] int errno / errno.h patch
  2010-03-03 14:02                                 ` EBo
@ 2010-03-03 17:59                                   ` Charles Forsyth
  0 siblings, 0 replies; 26+ messages in thread
From: Charles Forsyth @ 2010-03-03 17:59 UTC (permalink / raw)
  To: ebo, 9fans

>But for future reference should errno.h be used in Plan 9 programms or not?

not using plan 9's own libraries (it has neither errno nor errno.h),
but APE (ANSI/POSIX) programs should use <errno.h>



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

* Re: [9fans] problem using a vera font in rio
  2010-02-26  2:43                         ` erik quanstrom
  2010-02-26  2:53                           ` Ethan Grammatikidis
  2010-02-26 14:01                           ` [9fans] problem using a vera font in rio matt
@ 2010-03-08 18:42                           ` Albert Skye
  2 siblings, 0 replies; 26+ messages in thread
From: Albert Skye @ 2010-03-08 18:42 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

An interesting article on text rasterization algorithms:

	http://www.antigrain.com/research/font_rasterization/index.html

After evaluating many fonts for programming, I found Verdana to be the most readable, for the same reasons described here (though I use 11pt anti-aliased by OS X):

	http://nickgravgaard.com/cgi-bin/elastictabstopsnews/blosxom.cgi/2009/12/22



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

end of thread, other threads:[~2010-03-08 18:42 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-14 11:21 [9fans] problem using a vera font in rio Rudolf Sykora
2010-02-14 18:34 ` erik quanstrom
2010-02-14 19:09   ` Rudolf Sykora
2010-02-14 19:52     ` Federico G. Benavento
2010-02-15  4:15     ` erik quanstrom
2010-02-16  3:39       ` Russ Cox
2010-02-16  4:35         ` erik quanstrom
2010-02-16  4:57           ` andrey mirtchovski
2010-02-16  5:07             ` erik quanstrom
2010-02-16  6:58             ` Skip Tavakkolian
2010-02-17 16:31             ` Ethan Grammatikidis
2010-02-17 16:44               ` andrey mirtchovski
2010-02-25 21:45                 ` andrey mirtchovski
2010-02-25 22:01                   ` erik quanstrom
2010-02-25 23:08                   ` Russ Cox
2010-02-25 23:36                     ` andrey mirtchovski
2010-02-26  2:11                       ` Russ Cox
2010-02-26  2:43                         ` erik quanstrom
2010-02-26  2:53                           ` Ethan Grammatikidis
2010-03-02 16:49                             ` [9fans] int errno / errno.h patch EBo
2010-03-03  5:15                               ` Russ Cox
2010-03-03 14:02                                 ` EBo
2010-03-03 17:59                                   ` Charles Forsyth
2010-02-26 14:01                           ` [9fans] problem using a vera font in rio matt
2010-02-26 16:37                             ` david bulkow
2010-03-08 18:42                           ` Albert Skye

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).