As far as I can tell, ConTeXt doesn't include a keycaps font. I recently
created my own and would like to share it with anyone else that might
find it useful. I've included a sample document with it. If you're on a
*nix system with a working copy of ConTeXt and make, just type "make" to
build it.
http://blogs.gurulabs.com/stuart/archives/2005/09/free_keycaps_fo.html
I'm not sure what it would take, but I think this can be include with a
future version of ConTeXt if you're interested, Hans.
--
Stuart Jansen
Stuart Jansen wrote:
As far as I can tell, ConTeXt doesn't include a keycaps font. I recently created my own and would like to share it with anyone else that might find it useful. I've included a sample document with it. If you're on a *nix system with a working copy of ConTeXt and make, just type "make" to build it.
Very nice! I would like them to lay closer to a standard baseline, though, nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
On Mon, 2005-09-12 at 23:08 +0200, Nikolai Weibull wrote:
Stuart Jansen wrote:
As far as I can tell, ConTeXt doesn't include a keycaps font. I recently created my own and would like to share it with anyone else that might find it useful. I've included a sample document with it. If you're on a *nix system with a working copy of ConTeXt and make, just type "make" to build it.
Very nice! I would like them to lay closer to a standard baseline, though,
I'm not sure what you mean by "lay closer to a standard baseline". The
baseline of the glyph inside the key is aligned with text outside the
key. I waffled back and forth trying to find the most attractive
position while building the font. The majority of keycaps fonts I looked
at chose the same baseline.
I welcome any tweaking. Especially the addition of keys from other
keyboard layouts.
--
Stuart Jansen
Stuart Jansen wrote:
On Mon, 2005-09-12 at 23:08 +0200, Nikolai Weibull wrote:
Stuart Jansen wrote:
As far as I can tell, ConTeXt doesn't include a keycaps font. I recently created my own and would like to share it with anyone else that might find it useful. I've included a sample document with it. If you're on a *nix system with a working copy of ConTeXt and make, just type "make" to build it.
Very nice! I would like them to lay closer to a standard baseline, though,
I'm not sure what you mean by "lay closer to a standard baseline".
Neither am I...
The baseline of the glyph inside the key is aligned with text outside the key. I waffled back and forth trying to find the most attractive position while building the font. The majority of keycaps fonts I looked at chose the same baseline.
Ah, of course. That's perhaps as good as it gets, nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
At 02:16 PM 9/12/2005, you wrote:
I'm not sure what you mean by "lay closer to a standard baseline". The baseline of the glyph inside the key is aligned with text outside the key. I waffled back and forth trying to find the most attractive position while building the font. The majority of keycaps fonts I looked at chose the same baseline.
I welcome any tweaking. Especially the addition of keys from other keyboard layouts.
It occurs to me that one thing that would be particularly useful in a keycaps font would be pieces from which one could construct a "key" around a letter from another font -- specifically, a left side, a right side, and a middle portion made up only of purely horizontal lines so as to be extensible. One could potentially also have these in "short" and "tall" versions, depending on how the rest of the font worked. - Brooks
At 02:16 PM 9/12/2005, you wrote:
On Mon, 2005-09-12 at 23:08 +0200, Nikolai Weibull wrote:
Very nice! I would like them to lay closer to a standard baseline, though,
I'm not sure what you mean by "lay closer to a standard baseline". The baseline of the glyph inside the key is aligned with text outside the key. I waffled back and forth trying to find the most attractive position while building the font. The majority of keycaps fonts I looked at chose the same baseline.
Having looked at the uploaded .pdf, I agree: very nice! I do agree with Nikolai that there appears at first glance to be a bit of a baseline problem. As you mention, though, the baselines are "right". The actual difficulty, in my opinion, is that the font is just a bit too small, and so the _tops_ of the keys are too low -- it looks odd for them to be lower than the tops of the capital letters, when the depth of the keys is so large. Here's what I would suggest for the enlargement amounts: consider the examples where you have a key enclosed in parentheses. The bottom of the key drops below the bottom of the parentheses just a bit, which in my opinion looks quite good. I think it would be good to enlarge the font so that the top of the keys extend above the tops of the parentheses by an equal amount, so that this would look balanced -- in other words, so that the vertical center of the keys is aligned with the "math axis". (Admittedly, this does mean realigning the baselines, rather than just scaling the font.) This enlargement would also hopefully enable you to make the text within the keys larger -- at present, they're just barely legible on my 1280-pixel-wide monitor when I have the sample sheet sized to full-secreen-width. Aside from that quibble, though, they do look quite good. - Brooks
Brooks Moses wrote:
At 02:16 PM 9/12/2005, you wrote:
On Mon, 2005-09-12 at 23:08 +0200, Nikolai Weibull wrote:
Very nice! I would like them to lay closer to a standard baseline, though,
I'm not sure what you mean by "lay closer to a standard baseline". The baseline of the glyph inside the key is aligned with text outside the key. I waffled back and forth trying to find the most attractive position while building the font. The majority of keycaps fonts I looked at chose the same baseline.
Having looked at the uploaded .pdf, I agree: very nice!
I do agree with Nikolai that there appears at first glance to be a bit of a baseline problem. As you mention, though, the baselines are "right". The actual difficulty, in my opinion, is that the font is just a bit too small, and so the _tops_ of the keys are too low -- it looks odd for them to be lower than the tops of the capital letters, when the depth of the keys is so large.
Why not just center the characters? No problem for most of them since they have the same height (due to the upppercase char); All keyboards are different in positioning, so it does not hurt that much. By centering on gets a better look and feel. Concerning the 'construct a key' approach, how about the following: - provide shapes for a single, double-wide, tripple-wide, tripple height, enter-shape keys. - next we can make a series of virtual fonts using the new condensed latin modern (sans or monospaced) that way also keyboards for other languages can be constructed; I guess that a simple perl/ruby script can construct the virtual font. Nice initiative Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen wrote:
Concerning the 'construct a key' approach, how about the following:
- provide shapes for a single, double-wide, tripple-wide, tripple height, enter-shape keys.
Wouldn't it be reasonable to just create these borders via MetaFun? That way, I can have \key{\triangleleft home}, \key{any}, or even special keys for play station etc., without them being provided originally.
- next we can make a series of virtual fonts using the new condensed latin modern (sans or monospaced)
Oh, and I could have keyboard keys matching my current font, whatever that may be. Christopher
Christopher Creutzig wrote:
Hans Hagen wrote:
Concerning the 'construct a key' approach, how about the following:
- provide shapes for a single, double-wide, tripple-wide, tripple height, enter-shape keys.
Wouldn't it be reasonable to just create these borders via MetaFun? That way, I can have \key{\triangleleft home}, \key{any}, or even special keys for play station etc., without them being provided originally.
sure but it's kind of inefficient.
- next we can make a series of virtual fonts using the new condensed latin modern (sans or monospaced)
Oh, and I could have keyboard keys matching my current font, whatever that may be.
that would be true if there was a keycaps shapes font that could be combined with a regular font (making a virtual one) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Nikolai Weibull wrote:
Stuart Jansen wrote:
As far as I can tell, ConTeXt doesn't include a keycaps font. I recently created my own and would like to share it with anyone else that might find it useful. I've included a sample document with it. If you're on a *nix system with a working copy of ConTeXt and make, just type "make" to build it.
Very nice! I would like them to lay closer to a standard baseline, though,
can you post a pdf file? (we can ship a few font if needed; context also comes with two navigation fonts) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Mon, 2005-09-12 at 23:08 +0200, Nikolai Weibull wrote:
As far as I can tell, ConTeXt doesn't include a keycaps font. I recently created my own and would like to share it with anyone else that might find it useful. I've included a sample document with it. If you're on a *nix system with a working copy of ConTeXt and make, just type "make" to build it.
Very nice! I would like them to lay closer to a standard baseline, though,
I have uploaded a new version of the font with the baseline shifted.
Specifically, I have aligned the top of the heavy black bottom bar with
the baseline. In my documents at least, this is much more attractive.
Not sure how I arrived at a different conclusion initially.
http://blogs.gurulabs.com/stuart/
As suggested by Hans, I've also been trying to understand more about
defining custom encodings. Perhaps I will soon be able to post a version
of the font with easier to access characters.
--
Stuart Jansen
Stuart Jansen wrote:
As far as I can tell, ConTeXt doesn't include a keycaps font. I recently created my own and would like to share it with anyone else that might find it useful. I've included a sample document with it. If you're on a *nix system with a working copy of ConTeXt and make, just type "make" to build it.
http://blogs.gurulabs.com/stuart/archives/2005/09/free_keycaps_fo.html
I'm not sure what it would take, but I think this can be include with a future version of ConTeXt if you're interested, Hans.
is that really texnansi? these Function-1 keys etc are not in texnansi ... so, an option is to make a special encoding vector, say keycaps.enc and define proper names, like \definecharacter functioni .. \definecharacter functionii .. \definecharacter functioniii .. \definecharacter functioniv .. which permits: \definefont[keycaps][...][encoding=keycaps] {\keycaps ABC\functionvii DEF} Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hi, I have tried with: \startcases .. \stopcases and many others variations but I have got only errors. Any hint? Thanks. jk
At 04:42 PM 9/12/2005, you wrote:
I have tried with:
\startcases .. \stopcases
and many others variations but I have got only errors. Any hint?
Much like the bmatrix environment, the cases environment is an AMSmath package feature, and ConTeXt at present has very few of the direct equivalents to those implemented. You'll need to make this one up with a Plain TeX \matrix, as well. (The TeXbook is a pretty good reference for this.) Something like this should work, to recreate the example from page 8 of the AMSmath manual: P_{r-j} = \left\lbrace \matrix{ 0 \hfill& \text{if $r-j$ is odd} \hfill\cr r!(-1)^{(r-j)/2} \hfill& \text{if $r-j$ is even} \hfill\cr } \right. The \left\lbrace and \right. create the properly expanded brace at the left, the \matrix handles putting things in the right places, the \hfills make each of the columns left-aligned, and the \text{} commands (which _do_ exist in ConTeXt, unlike in Plain TeX) typeset their arguments as text rather than math. - Brooks
At 04:58 PM 9/12/2005, Brooks Moses wrote:
At 04:42 PM 9/12/2005, Jilani Khaldi
wrote: I have tried with:
\startcases .. \stopcases
and many others variations but I have got only errors. Any hint?
Much like the bmatrix environment, the cases environment is an AMSmath package feature, and ConTeXt at present has very few of the direct equivalents to those implemented. You'll need to make this one up with a Plain TeX \matrix, as well. (The TeXbook is a pretty good reference for this.)
I should follow my own advice! As the TeXbook points out, Plain TeX has a perfectly good \cases command which is also present in ConTeXt, and which you use like this: P_{r-j} = \cases{ 0 & if $r-j$ is odd,\cr r!(-1)^{(r-j)/2} & if $r-j$ is even.\cr } Note that, in this version, the text in the second column is _not_ enclosed in a \text command; the \cases command handles that automatically. In any case, the output is identical to the previous version I gave you, but this is easier to type. - Brooks
I should follow my own advice! As the TeXbook points out, Plain TeX has a perfectly good \cases command which is also present in ConTeXt, and which you use like this:
P_{r-j} = \cases{ 0 & if $r-j$ is odd,\cr r!(-1)^{(r-j)/2} & if $r-j$ is even.\cr }
Note that, in this version, the text in the second column is _not_ enclosed in a \text command; the \cases command handles that automatically.
Thank you very much. This is just what I need. jk -- // Jilani KHALDI http://jkhaldi.oltrelinux.com
On Tue, 2005-09-13 at 01:02 +0200, Hans Hagen wrote:
is that really texnansi? these Function-1 keys etc are not in texnansi ...
All I know for sure is that it Works For Me(tm). Unfortunately, my ConTeXt skills don't yet rise above that.
so, an option is to make a special encoding vector, say keycaps.enc and define proper names, like
\definecharacter functioni .. \definecharacter functionii .. \definecharacter functioniii .. \definecharacter functioniv ..
which permits:
\definefont[keycaps][...][encoding=keycaps]
{\keycaps ABC\functionvii DEF}
That would be easier to use. It's also worth noting that I saw some, but
not all, keys defined in Unicode.
--
Stuart Jansen
participants (6)
-
Brooks Moses
-
Christopher Creutzig
-
Hans Hagen
-
Jilani Khaldi
-
Nikolai Weibull
-
Stuart Jansen