On 08.11.2008 9:31 Uhr, Werner LEMBERG wrote:
>> * The second step, namely to create the protrusion settings, is by
>> far more difficult. Somebody would have to write files for each font
>> family (e.g. mt-song.cfg), containing the settings derived from
>> carefully checking for all symbols how much they should be protruded
>> into the margin; this takes time.
>
> Actually, this is quite easy, since only a very limited set of CJK
> punctuation characters can protude (less than 20 characters, I think).
Protrusion isn't necessarily limited to punctuation characters. E.g., in
Latin alphabets, characters like 'L' or 'r' or even 'k' should also be
protruded a tiny bit into the right margin, etc. Generally, it is about
making the margins appear straight by shifting all characters with less
visual weight on the sides.
>> Then, I am not sure how to reference the symbols: the (technically)
>> simplest possibility would be to just write out the slot numbers
>> from the fonts numerically -- not very user-friendly, since it would
>> involve finding out those numbers in the first place;
>
> This is done in CJK already, so it's not necessary to have a better
> interface.
No, but it needs to be integrated with microtype. For example,
protrusion settings are written like this:
\SetProtrusion
{% set of fonts to which these settings should apply:
encoding = ..., family = ..., ...
}
{% settings; glyphs may be accessed in one of the following forms:
A = {100,100}, % ASCII char
\textquoteleft = ..., % something declared with \DeclareTextSymbol
% in the font encoding file
\"{A} = ..., % something declared with \DeclareTextComposite
Ä = ..., % 8-bit or Unicode character, requires inputenc
027 = ..., % decimal number
"92 = ..., % hex
'255 = ..., % oct
}
The specifications are then all internally translated to refer to slot
numbers of the fonts. In order to do that, microtype has some knowledge
about the LICR notation, and of inputenc (see section 14.2.8:
"Translating characters into slots" in the microtype manual). What it
does not have (since I don't have it), is knowledge about CJK. If CJK
ideograms were indeed input using standard latex encoding schemes
(inputenc and fontenc), there wouldn't be a problem. However, from what
I gather, this doesn't seem to be the case. Therefore, microtype would
also have to be made acquainted with CJK's "input char->font slot"
translation.
>> Furthermore, microtype doesn't yet account for the so-called planes
>> that CJK adds to the NFSS, hence changes to my package would also be
>> necessary.
>
> This is rather straightforward: For a given CJK encoding like C00 or
> C10, you have a set of subfont postfixes, each one normally consisting
> of two trailing decimal digits.
How are the subfonts determined? I guess, this is transparent to the
user, ie., he doesn't have to (or cannot) choose the subfont himself,
but it's all done by CJK internally? This, again, would be something
necessary to re-model in microtype.
Provided CJK users are interested (and someone would help creating the
protrusion settings), I can have a closer look at all this -- however,
not before the end of the year.
PS. My last message didn't get through to the CJK list, as I'm not
subscribed. So, maybe you could full-quote this for Edward and anybody
else interested to read.
For the record, I'll just repeat the first part of my last mail:
> the statement that microtype `works with CJK' basically means that
> nothing should break when using both packages at the same time... For
> lack of fonts and of my understanding of CJK, I've never actually tried
> it out. Getting microtypography really to work would involve two steps:
>
> * Firstly, and this is the easy part, you have to add the CJK
> encodings to the microtype font sets, eg.:
>
> \DeclareMicrotypeSet{chinese}
> { encoding = {C00,C01,...} }
> \microtypesetup{protrusion=chinese,expansion=chinese}
>
> For expansion, which doesn't demand character-specific settings, this
> should work with pdftex (if you are using a non-Type1 font, it requires
> at least version 1.40).
Regards,
--
Robert
_______________________________________________
Cjk maillist - [email protected]
https://lists.ffii.org/mailman/listinfo/cjk