acme-0.12 - how to add antialiasing for cyrillic font

204 views
Skip to first unread message

Martinov...@gmail.com

unread,
Dec 2, 2008, 4:51:02 AM12/2/08
to acme-sac
Hi! I'm running acme-sac. It has nice antialiased font (Vera?) for
english characters, but cyrillic (russian) letters are from some other
font and has no antialiasing. Any hints how to change / enable
antialiasing for cyrillic font?

--
Sincerely
M.Martinov

caerwyn

unread,
Dec 2, 2008, 5:10:31 PM12/2/08
to acme-sac
Take a look here, http://mirtchovski.com/p9/freetype/

Mirtchovski's site is also where the Vera fonts came from:
http://mirtchovski.com/p9/vera/

If you have a TTF cyrillic font you should be able to convert it to
the font files used by Inferno using the ttf2subf tool on the site,
but you might need Plan9 to run the tool.

Caerwyn

Martinov...@gmail.com

unread,
Dec 3, 2008, 10:26:29 AM12/3/08
to acme-sac
Thanks a lot. I converted DejaVuSans font ( http://sourceforge.net/projects/dejavu/
), which is Vera + additional glyphs, to Inferno subfonts. If anyone
need it, you can get DejaVuSans in 14, 15, 16 points from

http://www.fazly.ru/files/martinov/dejavusans.tgz

Screenshot: http://www.fazly.ru/files/martinov/acme-font.png

I copied folder DejaVuSans to /fonts folder in acme-sac, and in /usr/
<my user name>/lib/profile changed string for acme font to: acme-font=/
fonts/DejaVuSans/DejaVuSans.15.font. For some reason there's vertical
displacement of two cyrillic uppercase symbols that have accent, but
it's appropriate for me.

Another question about acme-sac look. Acme looks very pleasant with
its pastel colors except these thick black lines that separate columns
and windows. Where in acme-sac source code is part that draw these
black borders? I want to change its colors to brown and blue.



> Take a look here,http://mirtchovski.com/p9/freetype/

caerwyn

unread,
Dec 3, 2008, 12:02:50 PM12/3/08
to acme-sac
Thanks. I didn't know about that one, the extra glyphs do
look better.

The issue with the vertical displacement has been noted by
others and is on the issue list.
http://code.google.com/p/acme-sac/issues/detail?id=16

I suspect the ttf2subf program used to generate the files,
but have not looked into it.

The border colors are not parametrized like the others,
but you can easily find all the locations:

agrep 'draw\(mainwin' /appl/acme/*.b | grep black

These are the changes you'd need to parametrize
the colors:

In /appl/acme/col.b
Edit ,x g/draw\(mainwin/x/black/c/colbordercol/

In /appl/acme/row.b
Edit ,x g/draw\(mainwin/x/black/c/rowbordercol/

Add line after /appl/acme/acme.m:17
colbordercol, rowbordercol : ref Draw->Image;

Add lines after /appl/acme/acme.b:1004
colbordercol = display.color(Draw->Bluegreen);
rowbordercol = display.color(Draw->Bluegreen);

Also edit /appl/acme/col.b:30 to import colbordercol from acme:
tagcols, textcols, colbordercol : import acme;

and edit /appl/acme/row.b:29 to import rowbordercol from acme:
fontnames , rowbordercol: import acme;

Caerwyn

On Dec 3, 10:26 am, "Martinov.Mich...@gmail.com"
<Martinov.Mich...@gmail.com> wrote:
> Thanks a lot. I converted DejaVuSans font (http://sourceforge.net/projects/dejavu/

Martinov...@gmail.com

unread,
Dec 4, 2008, 7:23:21 AM12/4/08
to acme-sac
Thank you very much for instructions. It worked very well. I only had
additionally to change /appl/acme/row.b:168 from

draw(mainwin, r1, colbordercol, nil, (0, 0)); to
draw(mainwin, r1, rowbordercol, nil, (0, 0));

and add colbordercolor to /appl/acme/row.b:29

in order to draw bottom border of "Newcol Kill Putall Dump Exit " tag
in right color.

I took colors that are already used in acme's colorscheme:

/appl/acme/acme.b:1004
colbordercol = display.color(Draw->Purpleblue);
rowbordercol = display.color(Draw->Yellowgreen);

Screenshot: http://www.fazly.ru/files/martinov/acme-colors.png.

Thanks again!



On 3 дек, 20:02, caerwyn <caerw...@gmail.com> wrote:
> Thanks. I didn't know about that one, the extra glyphs do
> look better.
>
> The issue with the vertical displacement has been noted by
> others and is on the issue list.http://code.google.com/p/acme-sac/issues/detail?id=16
Reply all
Reply to author
Forward
0 new messages