9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] problem using a vera font in rio
Date: Sun, 14 Feb 2010 23:15:17 -0500	[thread overview]
Message-ID: <f0d9febd9a8110c36e53888c9b134ba5@ladd.quanstro.net> (raw)
In-Reply-To: <a560a5d01002141109k23fc42bejcce7da435324fffb@mail.gmail.com>

> 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



  parent reply	other threads:[~2010-02-15  4:15 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-14 11:21 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f0d9febd9a8110c36e53888c9b134ba5@ladd.quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).