Hi all, I'm running into a problem, but maybe not all hope is lost. For my Greek stuff, I will sometimes need a "dotbelowcomb" accent. Only very few fonts have that, but no problem, in mkiv, I can simply take that from a follback font: \definefontfallback [GreekFallback] [name:texgyretermesregular] [0x0323] [force=no,check=no] Now I would like to remap the exclam character to this dotbelowcom. Again, no problem: with a fea file, I can write a sub rule sub exclam by dotbelowcomb but I can't combine both approaches: if the font doesn't have the character, I get an error about "invalid glyph index." In good old pdftex, it was possible to define a virtual font for such occasions, and I seem to remember that there's something similar in mkiv, but I'm unsure how it can be done. Any pointers? Thanks, and all best Thomas
Thomas A. Schmitz wrote:
Hi all,
I'm running into a problem, but maybe not all hope is lost. For my Greek stuff, I will sometimes need a "dotbelowcomb" accent. Only very few fonts have that, but no problem, in mkiv, I can simply take that from a follback font:
\definefontfallback [GreekFallback] [name:texgyretermesregular] [0x0323] [force=no,check=no]
Now I would like to remap the exclam character to this dotbelowcom.
If it was me, I would go for an active character, as that seems the most straightforward solution.
Again, no problem: with a fea file, I can write a sub rule
sub exclam by dotbelowcomb
It is better to forget about fea files alltogether. Even when they actually work, the interface is ugly.
but I can't combine both approaches: if the font doesn't have the character, I get an error about "invalid glyph index." In good old pdftex, it was possible to define a virtual font for such occasions, and I seem to remember that there's something similar in mkiv, but I'm unsure how it can be done. Any pointers?
Mkiv has an interface for virtual math, but I am not sure whether that also works for text fonts (not do I know how, if so). If it does not yet but could be made to do so, then that would be a very useful extension to the font fallbacks... Best wishes, Taco
Taco, thanks for your thoughts on that! On Oct 1, 2009, at 9:48 AM, Taco Hoekwater wrote:
Now I would like to remap the exclam character to this dotbelowcom.
If it was me, I would go for an active character, as that seems the most straightforward solution.
Here's what Hans wrote about a year ago :-)
no, active chars are a pain ... because they need to adapt to all kind of situations then, i'm glad that i got rid of the active : cum suis
of course we can add a new core-spa feature that remaps chars (kind of like french spacing)
My problem would be that I need the ! active only inside the macro assignment, so that would demand something along the \scantokens macro, and I have never quite understood how that works...
Again, no problem: with a fea file, I can write a sub rule
sub exclam by dotbelowcomb
It is better to forget about fea files alltogether. Even when they actually work, the interface is ugly.
I agree, but I found them quite useful for some of the crazy stuff that I'm doing with fonts... Maybe I'll write a simple lua gsub function and pass all text through that.
Mkiv has an interface for virtual math, but I am not sure whether that also works for text fonts (not do I know how, if so). If it does not yet but could be made to do so, then that would be a very useful extension to the font fallbacks...
I agree :-) Thanks Thomas
Taco Hoekwater wrote:
Mkiv has an interface for virtual math, but I am not sure whether that also works for text fonts (not do I know how, if so). If it does not yet but could be made to do so, then that would be a very useful extension to the font fallbacks...
the general font fallbacks mechanism (definefontfallback cum suis) can be used as one can remap ranges as well as individual characters 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 Oct 1, 2009, at 7:55 PM, Hans Hagen wrote:
Mkiv has an interface for virtual math, but I am not sure whether that also works for text fonts (not do I know how, if so). If it does not yet but could be made to do so, then that would be a very useful extension to the font fallbacks...
the general font fallbacks mechanism (definefontfallback cum suis) can be used as one can remap ranges as well as individual characters
Hans
Well, my problem is: want to remap ! to dotbelowcomb, AND I want this taken from a fallback font when the font doesn't have it. This doesn't work; I get errors about "invalid glyph index." Thomas
Thomas A. Schmitz wrote:
On Oct 1, 2009, at 7:55 PM, Hans Hagen wrote:
Mkiv has an interface for virtual math, but I am not sure whether that also works for text fonts (not do I know how, if so). If it does not yet but could be made to do so, then that would be a very useful extension to the font fallbacks...
the general font fallbacks mechanism (definefontfallback cum suis) can be used as one can remap ranges as well as individual characters
Hans
Well, my problem is: want to remap ! to dotbelowcomb, AND I want this taken from a fallback font when the font doesn't have it. This doesn't work; I get errors about "invalid glyph index."
hm, weird ... example ... ----------------------------------------------------------------- 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 -----------------------------------------------------------------
In trying to compile a LARGE project (585 pages, 260 figures, 27 tables, indexing, bibliography, ...), I produce an obscure luatex error: luatex: ../../../source/texk/web2c/luatexdir/tex/printing.c:266: print: Assertion `c < 256' failed. [329.327MTXrun | fatal error, no return code, message: luatex: execution interrupted probably due to a floatblock or other buffer overflow, I suspect. For if I remove about half of the chapters from the project, it will compile. Latest "minimals" distribution: ConTeXt ver: 2009.10.02 13:14 MKIV fmt: 2009.10.15 int: english/english mkiv lua stats : luatex banner - this is luatex, version beta-0.43.0-2009081914 I have tried both amd64 and i386, and both fail at the same point, so it is not a problem of (dynamic) memory allocation (there is more available on the first machine). The full project compiles under mkii but systematically fails under mkiv. Unfortunately, I cannot produce a "minimal" example... Can someone suggest how I should proceed, such as any configuration file that can be tuned... ? Thanks Alan
Hi,
luatex: ../../../source/texk/web2c/luatexdir/tex/printing.c:266: print: Assertion `c < 256' failed. [329.327MTXrun | fatal error, no return code, message: luatex: execution interrupted
A quick glance at the code, shows it's in the following part: /* An entire string is output by calling |print|. Note that if we are outputting the single standard ASCII character \.c, we could call |print("c")|, since |"c"=99| is the number of a single-character string, as explained above. But |print_char("c")| is quicker, so \TeX\ goes directly to the |print_char| routine when it knows that this is safe. (The present implementation assumes that it is always safe to print a visible ASCII character.) @^system dependencies@> The first 256 entries above the 17th unicode plane are used for a special trick: when \TeX\ has to print items in that range, it will instead print the character that results from substracting 0x110000 from that value. This allows byte-oriented output to things like \.{\\specials} and \.{\\pdfliterals}. Todo: Perhaps it would be useful to do the same substraction while typesetting. */ void print(integer s) { /* prints string |s| */ ... } else if (s >= 0x110000) { int c = s - 0x110000; assert(c < 256); print_char(c); } else { ... } It seems the second comment block talks about the code in which the error occurs. It also seems that this is either caused by some very high unicode character that's printed, or some invalid (uninitialized?) value is passed to print(). Do you think you could compile luatex with CFLAGS=-g, and run it in gdb to get a backtrace? That might help to see where this comes from... Gr. Matthijs
Matthijs Kooijman wrote:
It seems the second comment block talks about the code in which the error occurs. It also seems that this is either caused by some very high unicode character that's printed, or some invalid (uninitialized?) value is passed to print().
Do you think you could compile luatex with CFLAGS=-g, and run it in gdb to get a backtrace? That might help to see where this comes from...
Like Matthijs says, a backtrace is really needed to pinpoint this. If you can not figure out how to do that, then perhaps sending me (personally) the complete input in an archive is an option? Best wishes, Taco
On Thu, Oct 15, 2009 at 4:09 PM, Matthijs Kooijman
Hi,
luatex: ../../../source/texk/web2c/luatexdir/tex/printing.c:266: print: Assertion `c < 256' failed. [329.327MTXrun | fatal error, no return code, message: luatex: execution interrupted
A quick glance at the code, shows it's in the following part:
/* An entire string is output by calling |print|. Note that if we are outputting the single standard ASCII character \.c, we could call |print("c")|, since |"c"=99| is the number of a single-character string, as explained above. But |print_char("c")| is quicker, so \TeX\ goes directly to the |print_char| routine when it knows that this is safe. (The present implementation assumes that it is always safe to print a visible ASCII character.) @^system dependencies@>
The first 256 entries above the 17th unicode plane are used for a special trick: when \TeX\ has to print items in that range, it will instead print the character that results from substracting 0x110000 from that value. This allows byte-oriented output to things like \.{\\specials} and \.{\\pdfliterals}. Todo: Perhaps it would be useful to do the same substraction while typesetting. */
void print(integer s) { /* prints string |s| */ ... } else if (s >= 0x110000) { int c = s - 0x110000; assert(c < 256); print_char(c); } else { ... }
It seems the second comment block talks about the code in which the error occurs. It also seems that this is either caused by some very high unicode character that's printed, or some invalid (uninitialized?) value is passed to print().
Do you think you could compile luatex with CFLAGS=-g, and run it in gdb to get a backtrace? That might help to see where this comes from...
changing STRIP_LUATEX=TRUE in STRIP_LUATEX=FALSE in build.sh isn't enough ? -- luigi
Hi luigi,
Do you think you could compile luatex with CFLAGS=-g, and run it in gdb to get a backtrace? That might help to see where this comes from...
changing STRIP_LUATEX=TRUE in STRIP_LUATEX=FALSE in build.sh isn't enough ?
I don't know the luatex build system, I just posted general instructions :-) Gr. Matthijs
Hi luigi,
Do you think you could compile luatex with CFLAGS=-g, and run it in gdb to get a backtrace? That might help to see where this comes from...
changing STRIP_LUATEX=TRUE in STRIP_LUATEX=FALSE in build.sh isn't enough ?
I don't know the luatex build system, I just posted general instructions :-)
On Thu, Oct 15, 2009 at 4:32 PM, Matthijs Kooijman
On Thursday 15 October 2009 16:36:01 luigi scarso wrote:
On Thu, Oct 15, 2009 at 4:32 PM, Matthijs Kooijman
wrote: Hi luigi,
Do you think you could compile luatex with CFLAGS=-g, and run it in gdb to get a backtrace? That might help to see where this comes from...
changing STRIP_LUATEX=TRUE in STRIP_LUATEX=FALSE in build.sh isn't enough ?
I don't know the luatex build system, I just posted general instructions :-)
pretty simple, on linux: download source,uncompress and $>./build.sh
Not so easy: I have never compiled luatex before! $ svn checkout http://foundry.supelec.fr/svn/luatex (downloads 3.9G, including all beta versions in tag/) $ cd trunk $ ./build.sh --nostrip ... libtool: link: gcc lib/lib.a /home/local/src/luatex/trunk/build/texk/kpathsea/.libs/libkpathsea.a -lm lib/lib.a(main.o): In function `main': /home/local/src/luatex/trunk/build/texk/web2c/lib/../../../../source/texk/web2c/lib/main.c:26: undefined reference to `mainbody' collect2: ld returned 1 exit status make[5]: *** [tangleboot] Error 1 make[5]: Leaving directory `/home/local/src/luatex/trunk/build/texk/web2c' make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory `/home/local/src/luatex/trunk/build/texk/web2c' make[3]: *** [all] Error 2 make[3]: Leaving directory `/home/local/src/luatex/trunk/build/texk/web2c' make[2]: *** [subtexk] Error 1 make[2]: Leaving directory `/home/local/src/luatex/trunk/build/texk' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/local/src/luatex/trunk/build/texk' make: *** [all-recursive] Error 1 luatex binary not stripped ls: cannot access build/texk/web2c/luatex: No such file or directory $ So I do not yet have a compiled, unstripped version of luatex. Alan
On Thu, Oct 15, 2009 at 5:08 PM, Alan BRASLAU
On Thursday 15 October 2009 16:36:01 luigi scarso wrote:
On Thu, Oct 15, 2009 at 4:32 PM, Matthijs Kooijman
wrote: Hi luigi,
Do you think you could compile luatex with CFLAGS=-g, and run it in gdb to get a backtrace? That might help to see where this comes from...
changing STRIP_LUATEX=TRUE in STRIP_LUATEX=FALSE in build.sh isn't enough ?
I don't know the luatex build system, I just posted general instructions :-)
pretty simple, on linux: download source,uncompress and $>./build.sh
Not so easy: I have never compiled luatex before! welcome!
$ svn checkout http://foundry.supelec.fr/svn/luatex (downloads 3.9G, including all beta versions in tag/)
$ cd trunk $ ./build.sh --nostrip ... libtool: link: gcc lib/lib.a /home/local/src/luatex/trunk/build/texk/kpathsea/.libs/libkpathsea.a -lm lib/lib.a(main.o): In function `main': /home/local/src/luatex/trunk/build/texk/web2c/lib/../../../../source/texk/web2c/lib/main.c:26: undefined reference to `mainbody' collect2: ld returned 1 exit status make[5]: *** [tangleboot] Error 1 make[5]: Leaving directory `/home/local/src/luatex/trunk/build/texk/web2c' make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory `/home/local/src/luatex/trunk/build/texk/web2c' make[3]: *** [all] Error 2 make[3]: Leaving directory `/home/local/src/luatex/trunk/build/texk/web2c' make[2]: *** [subtexk] Error 1 make[2]: Leaving directory `/home/local/src/luatex/trunk/build/texk' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/local/src/luatex/trunk/build/texk' make: *** [all-recursive] Error 1 luatex binary not stripped ls: cannot access build/texk/web2c/luatex: No such file or directory $
Try add export CONFIG_SHELL='/bin/bash' in build.sh around line 14 ie from this # try to find gnu make; we may need it MAKE=make; to this # try to find gnu make; we may need it export CONFIG_SHELL='/bin/bash' MAKE=make; -- luigi
participants (6)
-
Alan BRASLAU
-
Hans Hagen
-
luigi scarso
-
Matthijs Kooijman
-
Taco Hoekwater
-
Thomas A. Schmitz