* Italic correction
@ 2011-08-15 18:04 Wolfgang Schuster
2011-08-15 19:13 ` Hans Hagen
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2011-08-15 18:04 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi,
is italic correction still supported with MkIV because in the following example the second sentence has the same length as the first.
% engine=pdftex
\starttext
\setbox\scratchbox\hbox{A short sentence with a {\it italic} word.} \the\wd\scratchbox\ : \box\scratchbox\par
\setbox\scratchbox\hbox{A short sentence with a {\it italic\/} word.} \the\wd\scratchbox\ : \box\scratchbox
\stoptext
Wolfgang
___________________________________________________________________________________
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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Italic correction
2011-08-15 18:04 Italic correction Wolfgang Schuster
@ 2011-08-15 19:13 ` Hans Hagen
2011-08-15 19:35 ` Wolfgang Schuster
0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2011-08-15 19:13 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 15-8-2011 8:04, Wolfgang Schuster wrote:
> Hi,
>
> is italic correction still supported with MkIV because in the following example the second sentence has the same length as the first.
>
> % engine=pdftex
>
> \starttext
> \setbox\scratchbox\hbox{A short sentence with a {\it italic} word.} \the\wd\scratchbox\ : \box\scratchbox\par
> \setbox\scratchbox\hbox{A short sentence with a {\it italic\/} word.} \the\wd\scratchbox\ : \box\scratchbox
> \stoptext
yes and no:
yes: the code is there
no : it has not been adapted to the font cleanup
So, first fix this in font-ext.lua:
local descriptions = tfmdata.descriptions
for unicode, d in next, tfmdata.characters do
local d = descriptions[unicode]
Then enable the feature:
\starttext
\definefontfeature[one][default]
\definefontfeature[two][default][itlc=yes]
\definefont[testa][SerifItalic*one]
\definefont[testb][SerifItalic*two]
\setbox\scratchbox\hbox{A short sentence with a {\testa italic} word.}
\the\wd\scratchbox\ : \box\scratchbox\par
\setbox\scratchbox\hbox{A short sentence with a {\testa italic\/} word.}
\the\wd\scratchbox\ : \box\scratchbox
\setbox\scratchbox\hbox{A short sentence with a {\testb italic} word.}
\the\wd\scratchbox\ : \box\scratchbox\par
\setbox\scratchbox\hbox{A short sentence with a {\testb italic\/} word.}
\the\wd\scratchbox\ : \box\scratchbox
\stoptext
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Italic correction
2011-08-15 19:13 ` Hans Hagen
@ 2011-08-15 19:35 ` Wolfgang Schuster
2011-08-15 20:33 ` Hans Hagen
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2011-08-15 19:35 UTC (permalink / raw)
To: Hans Hagen; +Cc: mailing list for ConTeXt users
Am 15.08.2011 um 21:13 schrieb Hans Hagen:
> On 15-8-2011 8:04, Wolfgang Schuster wrote:
>> Hi,
>>
>> is italic correction still supported with MkIV because in the following example the second sentence has the same length as the first.
>>
>> % engine=pdftex
>>
>> \starttext
>> \setbox\scratchbox\hbox{A short sentence with a {\it italic} word.} \the\wd\scratchbox\ : \box\scratchbox\par
>> \setbox\scratchbox\hbox{A short sentence with a {\it italic\/} word.} \the\wd\scratchbox\ : \box\scratchbox
>> \stoptext
>
> yes and no:
>
> yes: the code is there
> no : it has not been adapted to the font cleanup
>
> So, first fix this in font-ext.lua:
>
> local descriptions = tfmdata.descriptions
> for unicode, d in next, tfmdata.characters do
> local d = descriptions[unicode]
>
> Then enable the feature:
>
> \starttext
>
> \definefontfeature[one][default]
> \definefontfeature[two][default][itlc=yes]
Works. Can this be added to the default features?
Wolfgang
___________________________________________________________________________________
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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Italic correction
2011-08-15 19:35 ` Wolfgang Schuster
@ 2011-08-15 20:33 ` Hans Hagen
0 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2011-08-15 20:33 UTC (permalink / raw)
To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users
On 15-8-2011 9:35, Wolfgang Schuster wrote:
> Works. Can this be added to the default features?
depends on the performance drop I guess
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: italic correction
2003-09-23 21:24 ` Hans Hagen
@ 2003-09-24 7:36 ` Patrick Gundlach
0 siblings, 0 replies; 8+ messages in thread
From: Patrick Gundlach @ 2003-09-24 7:36 UTC (permalink / raw)
Hi,
> Of course:
>
> \def\MyIt{\groupedcommand\it\/}
I came across \groupedcommand some time ago and I wondered why it is
in there (and not in supp-fun.tex for example...). OK, I still don't
understand \HandleGroup ... completely, but the day just began and
coffee is almost ready.
Patrick
--
Silent is the goldfish in its bowl
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: italic correction
2003-09-23 16:39 italic correction Idris S Hamid
2003-09-23 17:25 ` Patrick Gundlach
@ 2003-09-23 21:07 ` Hans Hagen
2003-09-23 21:24 ` Hans Hagen
2 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2003-09-23 21:07 UTC (permalink / raw)
At 10:39 23/09/2003 -0600, you wrote:
>Dear syndicate,
>
>Sometimes I make a definition like
>
>\def\TR{\it}
>
>for certain purposes (structural consistency, etc.). How do I modify
>this to automatically do an italic correction the way \em is set up to
>do in \ConTeXt?
>
>======================
>
>By the way, did Hans ever make a "final" ConTeXt logo? I still think
>that
>
>\def\Context{{\sc C\kern -.0667emo\kern -.0667emn\kern -.0549emt\kern
>-.1667em\lower
> .5ex\hbox {e}\kern -.125emx\kern -.0549emt}}
>
>looks better than Con\TeX{}t (and the smaller \TeX better reflects its
>relative role in the whole package), and I've been using the former up
>to now. Hope that's not a problem-)
To suit your needs i've added:
\def\italicsequence#1#2%
{\ifx\fontalternative\c!sl#1\else
\ifx\fontalternative\c!it#1\else
\ifx\fontalternative\c!bs#1\else
\ifx\fontalternative\c!bi#1\else#2\fi\fi\fi\fi}
\def\symbolicscaledfont#1#2%
{\scaledfont\fontbody
\scaledfont#1\scaledfont
\font\definedfont\truefontname{\glyphfontfile{#2}} at
\currentfontbodyscale\scaledfont
\definedfont}
\def\symbolicfont
{\symbolicscaledfont\plusone}
\unexpanded\def\getscaledglyph#1#2#3%
{{\symbolicscaledfont{#1}{#2}\doifnumberelse{#3}\char\donothing#3}}
\def\Context
{\dontleavehmode{C\kern -.0667em\getscaledglyph{.8}\empty{O\kern
-.0667emN\kern
-.0549emT\italicsequence{\kern-.1em}{\kern-.1667em}\lower.5ex\hbox
{E}\italicsequence\empty{\kern-.11em}X\kern-.055emT}}}
This one adapts itself to sizes and styles and ...
{\Context \Context \sl \Context \bid\Context}
(maybe some values will change)
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
information: http://www.pragma-ade.com/roadmap.pdf
documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: italic correction
2003-09-23 16:39 italic correction Idris S Hamid
@ 2003-09-23 17:25 ` Patrick Gundlach
2003-09-23 21:07 ` Hans Hagen
2003-09-23 21:24 ` Hans Hagen
2 siblings, 0 replies; 8+ messages in thread
From: Patrick Gundlach @ 2003-09-23 17:25 UTC (permalink / raw)
Idris S Hamid <ishamid@lamar.colostate.edu> writes:
Hi,
> Sometimes I make a definition like
>
> \def\TR{\it}
>
> for certain purposes (structural consistency, etc.). How do I modify
> this to automatically do an italic correction the way \em is set up to
> do in \ConTeXt?
I'd do it like this:
\def\TR{\aftergroup \emphasiscorrection\it}
see the examples:
\def\TR{\aftergroup \/\it}
\startlines
{\it this is a roof}right?
{\TR this is a roof}right?
{\TR this is a roof}, right?
\def\TR{\aftergroup \emphasiscorrection\it}
{\TR this is a roof}right?
{\TR this is a roof}, right?
\stoplines
But I bet that there is a more clever way.
Patrick
--
Silent is the goldfish in its bowl
^ permalink raw reply [flat|nested] 8+ messages in thread
* italic correction
@ 2003-09-23 16:39 Idris S Hamid
2003-09-23 17:25 ` Patrick Gundlach
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Idris S Hamid @ 2003-09-23 16:39 UTC (permalink / raw)
Dear syndicate,
Sometimes I make a definition like
\def\TR{\it}
for certain purposes (structural consistency, etc.). How do I modify
this to automatically do an italic correction the way \em is set up to
do in \ConTeXt?
======================
By the way, did Hans ever make a "final" ConTeXt logo? I still think
that
\def\Context{{\sc C\kern -.0667emo\kern -.0667emn\kern -.0549emt\kern
-.1667em\lower
.5ex\hbox {e}\kern -.125emx\kern -.0549emt}}
looks better than Con\TeX{}t (and the smaller \TeX better reflects its
relative role in the whole package), and I've been using the former up
to now. Hope that's not a problem-)
best
Idris
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-08-15 20:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-15 18:04 Italic correction Wolfgang Schuster
2011-08-15 19:13 ` Hans Hagen
2011-08-15 19:35 ` Wolfgang Schuster
2011-08-15 20:33 ` Hans Hagen
-- strict thread matches above, loose matches on Subject: below --
2003-09-23 16:39 italic correction Idris S Hamid
2003-09-23 17:25 ` Patrick Gundlach
2003-09-23 21:07 ` Hans Hagen
2003-09-23 21:24 ` Hans Hagen
2003-09-24 7:36 ` Patrick Gundlach
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).