Hi, here are two bugs: * in pdftex, \letterspacefont does not disable the ligatures, but this is what happens in luatex. * neither \tagcode nor \pdfnoligatures seem to have any effect (for non-letterspaced fonts, that is). Example: \input luaotfload.sty \font\x="Latin Modern Roman:+liga;+tlig" at 12pt \tagcode\x`\f=-1 % no effect \pdfnoligatures\x % ditto \x fi -- \letterspacefont\y\x 100 % killing the ligatures \y fi -- \bye Best regards, -- Robert
Hi Robert, On 02/09/11 19:22, Robert wrote:
Hi,
here are two bugs:
* in pdftex, \letterspacefont does not disable the ligatures, but this is what happens in luatex.
* neither \tagcode nor \pdfnoligatures seem to have any effect (for non-letterspaced fonts, that is).
I've created a tracker item, but I am not sure yet whether either of them is actually a bug or simply a incompatibility. Best wishes, Taco
On 10.02.11 06:25, Taco Hoekwater wrote:
I've created a tracker item, but I am not sure yet whether either of them is actually a bug or simply a incompatibility.
I would call it an incompatibility bug ;-) As others have noted, some ligatures in letterspaced text shouldn't be broken. If \letterspacefont now disables all ligatures, this is no longer possible except by changing the font for each and every such ligature (and even for "--", "<<" etc.). This renders \letterspacefont basically useless. And to consider the fact that \tagcode and \pdfnoligatures are virtually no-ops as an incompatibility sounds like a strong euphemism to me... Of course, one could always use lua code, but if you provide the pdftex commands at all, I think they should function in a sensible way. Regards, -- Robert
On 10 feb. 2011, at 15:18, Robert
On 10.02.11 06:25, Taco Hoekwater wrote:
I've created a tracker item, but I am not sure yet whether either of them is actually a bug or simply a incompatibility.
I would call it an incompatibility bug ;-)
As others have noted, some ligatures in letterspaced text shouldn't be broken. If \letterspacefont now disables all ligatures, this is no longer possible except by changing the font for each and every such ligature (and even for "--", "<<" etc.). This renders \letterspacefont basically useless.
That is a convincing argument, i will try to fix \letterspacefont
And to consider the fact that \tagcode and \pdfnoligatures are virtually no-ops as an incompatibility sounds like a strong euphemism to me...
This is a different matter, i suspect that these primitives can only be Made to work with legacy fonts. Which would be an acceptable Compromise, i guess Best wishes, Taco
Hi Taco, here's an old issue with \letterspacefont, which I would like to raise again and expand upon: On 10.02.11 18:58, Taco Hoekwater wrote:
On 10 feb. 2011, at 15:18, Robert
wrote: On 10.02.11 06:25, Taco Hoekwater wrote:
I've created a tracker item, [1] but I am not sure yet whether either of them is actually a bug or simply a incompatibility.
I would call it an incompatibility bug ;-)
As others have noted, some ligatures in letterspaced text shouldn't be broken. If \letterspacefont now disables all ligatures, this is no longer possible except by changing the font for each and every such ligature (and even for "--", "<<" etc.). This renders \letterspacefont basically useless.
That is a convincing argument, i will try to fix \letterspacefont
As has been discovered recently, \letterspacefont will not only break ligatures, but also small caps [2,3], and, as it turns out, will in fact disable all features of the base font: \input luaotfload.sty \font\x="Linux Libertine O:+smcp;+onum" \x Abcd 0123 (\fontname\font)\par \letterspacefont\y\x 100 \y Abcd 0123 (\fontname\font)\bye Now, this would basically mean that \letterspacefont can only be used for type1, but not for opentype fonts. Is this really intended? [1] http://tracker.luatex.org/view.php?id=574 [2] http://tex.stackexchange.com/questions/27555/lualatex-fontspec-and-tracking-... [3] http://tex.stackexchange.com/questions/26141/textls-breaks-smallcaps-with-lu... Best, -- Robert
On 6-9-2011 04:22, Robert wrote:
\input luaotfload.sty \font\x="Linux Libertine O:+smcp;+onum" \x Abcd 0123 (\fontname\font)\par \letterspacefont\y\x 100 \y Abcd 0123 (\fontname\font)\bye
Now, this would basically mean that \letterspacefont can only be used for type1, but not for opentype fonts. Is this really intended?
I'm pretty sure it has been answered before (but not sure on what lists). I cannot test it here but you should use mode=base which will create a static font that is handled by tex itself as the tex machinery will copy the font data when you do that kind of letterspacing. The engine is ignorant of anything related to the font at the lua end so one might loose some very specific features provided outside the engine but that's no big deal as letterspacing spoils the game anyway. Smallcaps and oldstyles normally are no problem. (So, it's not a luatex bug.) 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 -----------------------------------------------------------------
On 06.09.11 10:31, Hans Hagen wrote:
On 6-9-2011 04:22, Robert wrote:
Now, this would basically mean that \letterspacefont can only be used for type1, but not for opentype fonts. Is this really intended?
I'm pretty sure it has been answered before (but not sure on what lists).
Ah yes, I see this has been raised on the context list.
I cannot test it here but you should use mode=base which will create a static font that is handled by tex itself as the tex machinery will copy the font data when you do that kind of letterspacing. The engine is ignorant of anything related to the font at the lua end so one might loose some very specific features provided outside the engine but that's no big deal as letterspacing spoils the game anyway. Smallcaps and oldstyles normally are no problem.
Thanks, that works. Would you mind elaborating on the difference between base and node mode a bit, or could you point me to the relevant documentation? I'm unable to find anything more specific than that base mode does not support Opentype "fully" (luaotfload). But what exactly is not supported, what would you lose by switching from node to base mode? Best, -- Robert
Le 07/09/2011 05:03, Robert a écrit :
On 06.09.11 10:31, Hans Hagen wrote:
I cannot test it here but you should use mode=base which will create a static font that is handled by tex itself as the tex machinery will copy the font data when you do that kind of letterspacing. The engine is ignorant of anything related to the font at the lua end so one might loose some very specific features provided outside the engine but that's no big deal as letterspacing spoils the game anyway. Smallcaps and oldstyles normally are no problem.
Thanks, that works. Would you mind elaborating on the difference between base and node mode a bit, or could you point me to the relevant documentation? I'm unable to find anything more specific than that base mode does not support Opentype "fully" (luaotfload). But what exactly is not supported, what would you lose by switching from node to base mode?
If I'm not mistaken, "base mode" implements OT features like traditional TeX fonts, and thus only those features supported by TeX can be used; for instance, simple ligatures or kerning is easily done this way, because those already exist for TFM fonts. But contextual features, for instance, or even simple ligatures with more than two input glyphs, aren't supported this way, because TeX knows nothing about them; there is nothing devoted to them in the way fonts are organised. So you use "node mode", which boils down to inspecting lists of nodes before the paragraph is constructed (in one of the callbacks before linebreak_filter) and changing what must be changed; of course the traditional features can be implemented this way too. As for the documentation, I don't think there is any! Best, Paul
On 7-9-2011 08:15, Paul Isambert wrote:
As for the documentation, I don't think there is any!
There has been articles / presentations about the plain module (which serves as starting point for the latex one) as well as the usage in context. Recently the interface has been redone a bit so that there is a more clear separation between generic and non generic (read: context) code. At some point (i.e. when things are stable enough) I will document the relevant parts of the api. But anyway, your description on the difference between node mode and base mode is correct. As most users will use a wrapper macro level I suppose that manuals that discuss such a wrapper will also discuss relevant keys/values (or provide some layer around it). 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 -----------------------------------------------------------------
On 07.09.11 08:15, Paul Isambert wrote:
Le 07/09/2011 05:03, Robert a écrit :
On 06.09.11 10:31, Hans Hagen wrote:
I cannot test it here but you should use mode=base which will create a static font that is handled by tex itself as the tex machinery will copy the font data when you do that kind of letterspacing. The engine is ignorant of anything related to the font at the lua end so one might loose some very specific features provided outside the engine but that's no big deal as letterspacing spoils the game anyway. Smallcaps and oldstyles normally are no problem.
Thanks, that works. Would you mind elaborating on the difference between base and node mode a bit, or could you point me to the relevant documentation? I'm unable to find anything more specific than that base mode does not support Opentype "fully" (luaotfload). But what exactly is not supported, what would you lose by switching from node to base mode?
If I'm not mistaken, "base mode" implements OT features like traditional TeX fonts, and thus only those features supported by TeX can be used; for instance, simple ligatures or kerning is easily done this way, because those already exist for TFM fonts.
But contextual features, for instance, or even simple ligatures with more than two input glyphs, aren't supported this way, because TeX knows nothing about them; there is nothing devoted to them in the way fonts are organised. So you use "node mode", which boils down to inspecting lists of nodes before the paragraph is constructed (in one of the callbacks before linebreak_filter) and changing what must be changed; of course the traditional features can be implemented this way too.
Thanks for the information. I will tell users then to use base mode, for the time being. Probably not surprising, but just for the record (and I guess this won't change, either): The same loss of font features as with \letterspacefont also happens with \pdfcopyfonts. Regards, -- Robert
On Feb 9, 2011, at 1:22 PM, Robert wrote:
* in pdftex, \letterspacefont does not disable the ligatures, but this is what happens in luatex.
IMO that's a desireable behaviour, not a bug. See Bringhurst, Oliver Simon's _Introduction to Typography_ &c. A control to turn it off or on (defaulting to disabling the ligatures) would be okay, but I've had to put a lot of effort into turning off ligatures when letterspacing and it's a pain. William -- William Adams senior graphic designer Fry Communications Sphinx of black quartz, judge my vow.
* in pdftex, \letterspacefont does not disable the ligatures, but this is what happens in luatex.
IMO that's a desireable behaviour, not a bug. See Bringhurst, Oliver Simon's _Introduction to Typography_ &c.
A control to turn it off or on (defaulting to disabling the ligatures) would be okay, but I've had to put a lot of effort into turning off ligatures when letterspacing and it's a pain.
In older german texts ligatures are not letter spaced. For example: B i s m a r ck (the ck ligature is not seperated) Patrick
On 02/10/11 13:53, Patrick Gundlach wrote:
* in pdftex, \letterspacefont does not disable the ligatures, but this is what happens in luatex.
IMO that's a desireable behaviour, not a bug. See Bringhurst, Oliver Simon's _Introduction to Typography_ &c.
A control to turn it off or on (defaulting to disabling the ligatures) would be okay, but I've had to put a lot of effort into turning off ligatures when letterspacing and it's a pain.
In older german texts ligatures are not letter spaced. For example:
B i s m a r ck
(the ck ligature is not seperated)
Neither was ij in dutch, but ff was separated. Which just goes to show you that doing letterspacing automatically is hard....
On Feb 10, 2011, at 7:56 AM, Taco Hoekwater wrote:
On 02/10/11 13:53, Patrick Gundlach wrote:
* in pdftex, \letterspacefont does not disable the ligatures, but this is what happens in luatex.
IMO that's a desireable behaviour, not a bug. See Bringhurst, Oliver Simon's _Introduction to Typography_ &c.
A control to turn it off or on (defaulting to disabling the ligatures) would be okay, but I've had to put a lot of effort into turning off ligatures when letterspacing and it's a pain.
In older german texts ligatures are not letter spaced. For example:
B i s m a r ck
(the ck ligature is not seperated)
Neither was ij in dutch, but ff was separated. Which just goes to show you that doing letterspacing automatically is hard....
ck and ij would be (like ae and oe) diphthongs --- linguistic constructs denoting specific sounds. ff is a ligature --- the joining together of two or more characters for stylistic or technical reasons. William -- William Adams senior graphic designer Fry Communications Sphinx of black quartz, judge my vow.
On 02/10/11 13:59, William Adams wrote:
ck and ij would be (like ae and oe) diphthongs --- linguistic constructs denoting specific sounds.
ff is a ligature --- the joining together of two or more characters for stylistic or technical reasons.
But there is no distinction between those two in OpenType ...
On 02/10/11 14:02, Taco Hoekwater wrote:
On 02/10/11 13:59, William Adams wrote:
ck and ij would be (like ae and oe) diphthongs --- linguistic constructs denoting specific sounds.
ff is a ligature --- the joining together of two or more characters for stylistic or technical reasons.
But there is no distinction between those two in OpenType ...
Moral of this: if you want to do nice letterspacing in luatex, use lua code instead of pdftex's \letterspacefont. Best wishes, Taco
On Feb 10, 2011, at 8:02 AM, Taco Hoekwater wrote:
But there is no distinction between those two in OpenType ...
Couldn't one create that distinction by how one sets the text? Directly input the unicode character for the diphthongs, while allowing the ligatures to be constructed by OpenType rules --- that way the diphthongs would be left alone in situations like this, while ligatures would never be made when not appropriate. I thought this was the whole point behind the Unicode Consortium choosing not to allocate code points for ligatures. William -- William Adams senior graphic designer Fry Communications Sphinx of black quartz, judge my vow.
Couldn't one create that distinction by how one sets the text?
Directly input the unicode character for the diphthongs, while allowing the ligatures to be constructed by OpenType rules --- that way the diphthongs would be left alone in situations like this, while ligatures would never be made when not appropriate.
But then it would be a matter of the backend, not LuaTeX (except for \letterspacefont), right?
I thought this was the whole point behind the Unicode Consortium choosing not to allocate code points for ligatures.
what about U+FB03 for example? (LATIN SMALL LIGATURE FFI) Perhaps I misunderstood you. Patrick
On Feb 10, 2011, at 8:45 AM, Patrick Gundlach wrote:
Couldn't one create that distinction by how one sets the text?
Directly input the unicode character for the diphthongs, while allowing the ligatures to be constructed by OpenType rules --- that way the diphthongs would be left alone in situations like this, while ligatures would never be made when not appropriate.
But then it would be a matter of the backend, not LuaTeX (except for \letterspacefont), right?
Yep.
I thought this was the whole point behind the Unicode Consortium choosing not to allocate code points for ligatures.
what about U+FB03 for example? (LATIN SMALL LIGATURE FFI)
Perhaps I misunderstood you.
No. I should've been more specific ``...the whole point behind the Unicode consortium choosing not to allocate any additional code points for ligatures beyond those which were provided for legacy's sake.'' William -- William Adams senior graphic designer Fry Communications Sphinx of black quartz, judge my vow.
I thought this was the whole point behind the Unicode Consortium choosing not to allocate code points for ligatures.
what about U+FB03 for example? (LATIN SMALL LIGATURE FFI)
As William says, this is for compatibility with a legacy encoding, just as the hundreds of Arabic "presentation forms" that lurk nearby. But, for that matter, this is also the reason for inclusion of the ij ligature (U+0132 LATIN CAPITAL LIGATURE IJ and lowercase U+0133). Arthur
On Thu, Feb 10, 2011 at 02:02:25PM +0100, Taco Hoekwater wrote:
On 02/10/11 13:59, William Adams wrote:
ck and ij would be (like ae and oe) diphthongs --- linguistic constructs denoting specific sounds.
ff is a ligature --- the joining together of two or more characters for stylistic or technical reasons.
But there is no distinction between those two in OpenType ...
There can be, you can use rlig (required ligatures) for the former and liga (regular ligatures for the later) and letterspaced fonts would only disable liga (I know few Frakture fonts that do it that way). But this is likely to be a question to Hans not Taco since we are dealing with non-tfm fonts here. Regards, Khaled -- Khaled Hosny Egyptian
participants (8)
-
Arthur Reutenauer
-
Hans Hagen
-
Khaled Hosny
-
Patrick Gundlach
-
Paul Isambert
-
Robert
-
Taco Hoekwater
-
William Adams