* Re: guillemets and plr10 font
2002-05-25 15:28 guillemets and plr10 font Denis B. Roegel
@ 2002-05-25 16:15 ` Giuseppe Bilotta
2002-05-25 20:22 ` Hans Hagen
1 sibling, 0 replies; 3+ messages in thread
From: Giuseppe Bilotta @ 2002-05-25 16:15 UTC (permalink / raw)
Cc: ntg-context
[-- Attachment #1: Type: text/plain, Size: 497 bytes --]
Saturday, May 25, 2002 Denis B. Roegel wrote:
DBR> I just noticed that French guillemets are taken from the Polish fonts.
DBR> This is fine, but can this be changed if one doesn't have these fonts?
Attached to this mail are two ConTeXt modules I use to get the
guillemots from the LaTeX symbol files or the WNC fonts. They have
not yet been adapted to the latest ConTeXt guillemots management,
but they seem to work more or less fine even with the latest
ConTeXt.
--
Giuseppe "Oblomov" Bilotta
[-- Attachment #2: symb-lsy.tex --]
[-- Type: application/octet-stream, Size: 1790 bytes --]
%D \module
%D [ file=symb-lsy,
%D version=2001.10.23,
%D title=\CONTEXT\ Symbol Libraries,
%D subtitle=Guillemots from LaTeX Symbols,
%D author=Giuseppe Bilotta,
%D date=\currentdate,
%D copyright={PRAGMA / Giuseppe Bilotta}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\unprotect
%D First of all, define the font file. TODO: how to choose the
%D appropriate font design size?
\definefontsynonym [LasySerif] [lasy10]
\definefontsynonym [LasySerifBold] [lasyb10]
\definefontsynonym [LasySans] [lasy10]
\definefontsynonym [LasySansBold] [lasyb10]
\def\Lasy#1{\getglyph{Lasy}{\char#1}}
%D The LaSy font doesn't have double guillemots, but only left
%D and right single guillemots; we build the double ones by
%D duplicating the single one, shifted by half their size
\newdimen\LeftLasyShift
\newdimen\RightLasyShift
%D Since different sizes require different shifts, we have to
%D calculate it each time. Another way would be to plug into the
%D typescript stuff, and recalculate only at size-change time.
%D This way is slower but doesn't mess with internal stuff
\def\SetLeftLasyShift%
{\setbox\scratchbox\hbox{\Lasy{40}}%
\LeftLasyShift=.5\wd\scratchbox}
\def\SetRightLasyShift%
{\setbox\scratchbox\hbox{\Lasy{41}}%
\RightLasyShift=.5\wd\scratchbox}
%D Here we define the quick-access commands
\def\leftguillemot%
{\dontleavehmode\hbox{\SetLeftLasyShift%
\Lasy{40}\kern-\LeftLasyShift\Lasy{40}}}
\def\rightguillemot%
{\hbox{\SetRightLasyShift%
\Lasy{41}\kern-\RightLasyShift\Lasy{41}}}
\def\leftsubguillemot{\Lasy{40}}
\def\rightsubguillemot{\Lasy{41}}
\protect
\endinput
[-- Attachment #3: symb-wnc.tex --]
[-- Type: application/octet-stream, Size: 813 bytes --]
%D \module
%D [ file=symb-wnc,
%D version=2001.10.23,
%D title=\CONTEXT\ Symbol Libraries,
%D subtitle=Guillemots from the Cyrillic fonts,
%D author=Giuseppe Bilotta,
%D date=\currentdate,
%D copyright={PRAGMA / Giuseppe Bilotta}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\unprotect
\definefontsynonym [GuillsSerif] [wncyr10]
\definefontsynonym [GuillsSerifBold] [wncyb10]
\definefontsynonym [GuillsSerifItalic] [wncyi10]
\definefontsynonym [GuillsSerifCaps] [wncysc10]
\definefontsynonym [GuillsSans] [wncyss10]
\def\Guill#1{\getglyph{Guills}{\char#1}}
\def\leftguillemot{\Guill{60}}
\def\rightguillemot{\Guill{62}}
\protect
\endinput
^ permalink raw reply [flat|nested] 3+ messages in thread