From: "Alan Stone" <software.list.1es9s@gmail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: ansi codes
Date: Fri, 3 Oct 2008 22:15:20 +0200 [thread overview]
Message-ID: <326847810810031315p4a7f5e47p19077790291c7aea@mail.gmail.com> (raw)
In-Reply-To: <48E3D6D9.5000609@wxs.nl>
[-- Attachment #1.1: Type: text/plain, Size: 1221 bytes --]
On Wed, Oct 1, 2008 at 10:00 PM, Hans Hagen <pragma@wxs.nl> wrote:
> Mojca Miklavec wrote:
> > On Wed, Oct 1, 2008 at 2:57 PM, Alan Stone wrote:
> >> Is there a (preferably free) Linux or Windows font tool out there which
> >> allows to print a font's characters and corresponding character codes ?
> >
> > Geeks do it with LuaTeX :)
> >
> > I'm not sure if this still works since I have no luatex here, but in
> > theory you can play with something like this:
> >
> > % do whatever you want with it
> > \def\mychar#1#2{#1: #2\crlf}
> >
> > \starttext
> > \ctxlua{
> > fontname = 'texgyrepagella-regular.otf'
> > tfmdata = fonts.tfm.read_and_define("file:" .. fontname, 655360)
> >
> > w = tfmdata.characters
> > for i=0,100000 do
> > if w[i] then
> > tex.sprint("\\strut\\mychar{" .. i, "}{\\type{",
> w[i].name, "}}")
> > end
> > end
> > }
> > \stoptext
>
> lesser geeks loom in s-fnt-10.tex -)
>
> Hans
>
>
Is something missing to make it work ? See attachements.
Tried with WXP & LNX.
--
Best,
Alan
* texexec --lua foo
* ConTeXt ver: 2008.10.01 19:13 MKIV fmt: 2008.10.3 int: english/english
* Ubuntu 8.04 Hardy Heron (Desktop)
[-- Attachment #1.2: Type: text/html, Size: 2045 bytes --]
[-- Attachment #2: s-fnt-10.tex --]
[-- Type: application/x-tex, Size: 1191 bytes --]
[-- Attachment #3: s-fnt-10.log --]
[-- Type: application/octet-stream, Size: 2414 bytes --]
(s-fnt-10.tex
ConTeXt ver: 2008.10.01 00:07 MKIV fmt: 2008.10.2 int: english/english
language : language en is active
system : cont-new loaded
(C:/context/tex/texmf-context/tex/context/base/cont-new.tex
systems : beware: some patches loaded from cont-new.tex
(C:/context/tex/texmf-context/tex/context/base/cont-new.mkiv
lua : used config path - C:/context/tex/texmf/web2c/texmf.cnf
lua : used cache path - C:/context/tex/texmf-cache/luatex-cache/context/2fea56f92e5267d7cc9662e4d5f52e1e
) (C:/context/tex/texmf-context/tex/context/base/cont-mtx.tex))
system : cont-old loaded
(C:/context/tex/texmf-context/tex/context/base/cont-old.tex
loading : Context Old Macros
)
system : cont-fil loaded
(C:/context/tex/texmf-context/tex/context/base/cont-fil.tex
loading : Context File Synonyms
)
system : cont-sys loaded
(C:/context/tex/texmf-context/tex/context/user/cont-sys.tex (C:/context/tex/texmf-context/tex/context/base/type-tmf.tex) (C:/context/tex/texmf-context/tex/context/base/type-siz.tex) (C:/context/tex/texmf-context/tex/context/base/type-otf.tex))
bodyfont : 12pt rm is loaded
specials : tex loaded
system : s-fnt-10.top loaded
(s-fnt-10.top
specials : loading definition file tpd
(C:/context/tex/texmf-context/tex/context/base/spec-tpd.tex
specials : loading definition file fdf
(C:/context/tex/texmf-context/tex/context/base/spec-fdf.tex (C:/context/tex/texmf-context/tex/context/base/spec-fdf.mkiv))
specials : fdf loaded
(C:/context/tex/texmf-context/tex/context/base/spec-tpd.mkiv))
specials : fdf loaded
) (s-fnt-10.tuo) (s-fnt-10.tuo)
systems : begin file s-fnt-10 at line 43
! LuaTeX error <main ctx instance>:1: attempt to call field 'show_all' (a nil value)
stack traceback:
<main ctx instance>:1: in main chunk.
\ShowCompleteFont ... \ctxlua { fonts.show_all() }
\stopcolumns \page \egroup
l.48 \ShowCompleteFont{name:arial}{10pt}{2}
?
! Emergency stop.
\ShowCompleteFont ... \ctxlua { fonts.show_all() }
\stopcolumns \page \egroup
l.48 \ShowCompleteFont{name:arial}{10pt}{2}
End of file on the terminal!
! ==> Fatal error occurred, no output PDF file produced!
[-- Attachment #4: Type: text/plain, Size: 487 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2008-10-03 20:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-30 10:23 Alan Stone
2008-09-30 11:37 ` Taco Hoekwater
2008-09-30 14:01 ` Alan Stone
2008-09-30 14:16 ` Taco Hoekwater
2008-10-01 12:57 ` Alan Stone
2008-10-01 13:05 ` Taco Hoekwater
2008-10-01 18:30 ` Mojca Miklavec
2008-10-01 20:00 ` Hans Hagen
2008-10-03 20:15 ` Alan Stone [this message]
2008-11-14 15:25 ` Thomas A. Schmitz
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=326847810810031315p4a7f5e47p19077790291c7aea@mail.gmail.com \
--to=software.list.1es9s@gmail.com \
--cc=ntg-context@ntg.nl \
/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).