groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Bitstream vera sans


From: John Gardner
Subject: Re: [Groff] Bitstream vera sans
Date: Wed, 9 Aug 2017 14:15:24 +1000

Hey there,

If you have FontForge <https://fontforge.github.io/>'s command-line
tools installed, you can use this shell function
<https://github.com/Alhadis/.files/blob/6b0e61c7f352f8b2c6022202c72b972060435977/functions.sh#L144-L169>
to quickly convert fonts to AFM:

$ convert-font Vera.ttf afm


Hope it helps someone! Source copied below for ease-of-reference:

# Convert a font to another format. Defaults to OpenType.
> # - Usage: convert-font [path] [to=otf]
> convert-font(){
> [ $# -eq 0 ] && {
> echo >&2 "Usage: convert-font /path/to/file [format=.otf]"
> return 1;
> }
> local format=$(echo ${2:-.otf} | tr -d '.')
> fontforge -nosplash -lang=ff -c '
> fonts = FontsInFile($1);
> count = SizeOf(fonts);
> if(count != 0)
> i = 0;
> while(i < count)
> Open($1 + "(" + i + ")");
> Generate(fonts[i] + "." + $2);
> Close();
> i++;
> endloop
> else
> Open($1);
> Generate($1:r + "." + $2);
> endif
> ' "$1" "$2" 2>/dev/null;
> }


On 9 August 2017 at 13:45, mikkel meinike <address@hidden> wrote:

> Thanks Steffen
>
> I've used Peters font script before and been very happy about it. I just
> needed to understand it a bit more of what is actually involved in the
> steps. I'll have a look at that link you send me.
>
> Mikkel
>
>
>
> Den 8. aug. 2017 22.03 skrev "Steffen Nurpmeso" <address@hidden>:
>
> Hi.
>
> mikkel meinike <address@hidden> wrote:
>  |Can any of you walk me through what I should do to use the font
> 'bitstream
>  |vera sans' in my groff document? The font is somehow available in my
> system
>  |because I use it in my terminal (rxvt-unicode)
>
> Peter Schaffter has written something that might help you out[1].
> With it one can easily convert fonts for use with roff.
>
>   [1] http://www.schaffter.ca/mom/mom-06.html
>
> --steffen
> |
> |Der Kragenbaer,                The moon bear,
> |der holt sich munter           he cheerfully and one by one
> |einen nach dem anderen runter  wa.ks himself off
> |(By Robert Gernhardt)
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]