Bug in 3.141592653-2.6-0.999995 (TeX Live 2023) with fontspec and tabularray?

Karl Berry karl at freefriends.org
Wed Feb 7 22:36:21 CET 2024


Hi Ross,

    https://sourceforge.net/p/xetex/bugs/185/

Thanks for the proposed patch.

The question in my mind is that D2Fix is used in many places throughout
XeTeX (see below). Thus changing that fn to truncate instead of round
seems like an awfully big change to be making at this point, with the
potential of changing line breaks in any existing document. Will it
cause more problems than it will solve? Although I can see that fixing
xetex to have the same breaks as other engines is certainly desirable.

I'll ask Jonathan (Kew). --thanks, karl.

cd Build/source/texk/web2c/xetexdir/
grep -anHri d2fix
./XeTeXLayoutInterface.cpp:206:    return D2Fix(tan(-italAngle * M_PI / 180.0));
./XeTeXOTMath.cpp:62:                rval = D2Fix(font->unitsToPoints(rval));
./XeTeXOTMath.cpp:198:            *adv = D2Fix(font->unitsToPoints(variant->advance));
./XeTeXOTMath.cpp:246:        rval = D2Fix(font->unitsToPoints(rval));
./XeTeXOTMath.cpp:261:        rval = D2Fix(font->unitsToPoints(rval));
./XeTeXOTMath.cpp:276:        rval = D2Fix(font->unitsToPoints(rval));
./XeTeXOTMath.cpp:455:    rval = D2Fix(font->unitsToPoints(rval));
./XeTeXOTMath.cpp:486:        rval = D2Fix(font->unitsToPoints(a->parts[i].start_connector_length));
./XeTeXOTMath.cpp:499:        rval = D2Fix(font->unitsToPoints(a->parts[i].end_connector_length));
./XeTeXOTMath.cpp:512:        rval = D2Fix(font->unitsToPoints(a->parts[i].full_advance));
./XeTeX_ext.c:1195:                    Fixed dsize = D2Fix(getDesignSize(font));
./XeTeX_ext.c:1205:                loadedfontdesignsize = D2Fix(getDesignSize(font));
./XeTeX_ext.c:1249:                    Fixed dsize = D2Fix(getDesignSize(font));
./XeTeX_ext.c:1330:    *ascent = D2Fix(a);
./XeTeX_ext.c:1331:    *descent = D2Fix(d);
./XeTeX_ext.c:1333:    *slant = D2Fix(Fix2D(getSlant(getFont(engine))) * getExtendFactor(engine)
./XeTeX_ext.c:1338:    *capheight = D2Fix(a);
./XeTeX_ext.c:1339:    *xheight = D2Fix(d);
./XeTeX_ext.c:1346:            *xheight = D2Fix(a);
./XeTeX_ext.c:1356:            *capheight = D2Fix(a);

./XeTeX_ext.c:1630:        size = D2Fix(fSize);
./XeTeX_ext.c:1649:        size = D2Fix(getPointSize(engine));
./XeTeX_ext.c:1718:        Fixed f = D2Fix(extend);
./XeTeX_ext.c:1723:        Fixed f = D2Fix(slant);
./XeTeX_ext.c:1728:        Fixed f = D2Fix(embolden);
./XeTeX_ext.c:1812:    *height = D2Fix(ht);
./XeTeX_ext.c:1813:    *depth = D2Fix(dp);
./XeTeX_ext.c:1860:    *lsb = D2Fix(l);
./XeTeX_ext.c:1861:    *rsb = D2Fix(r);
./XeTeX_ext.c:1889:    return D2Fix((edge <= 2) ? a : b);
./XeTeX_ext.c:1911:        wd = D2Fix(GetGlyphWidth_AAT(attributes, gid));
./XeTeX_ext.c:1917:        wd = D2Fix(getGlyphWidthFromEngine(engine, gid));
./XeTeX_ext.c:1974:                locations[i].x = D2Fix(Fix2D(locations[i].x) + adjustment);
./XeTeX_ext.c:1982:                locations[i].x = D2Fix(Fix2D(locations[i].x) + justAmount * i / (glyphCount - 1));
./XeTeX_ext.c:2067:                        locations[totalGlyphCount].x = D2Fix(positions[i].x + x);
./XeTeX_ext.c:2068:                        locations[totalGlyphCount].y = D2Fix(positions[i].y + y);
./XeTeX_ext.c:2069:                        glyphAdvances[totalGlyphCount] = D2Fix(advances[i]);
./XeTeX_ext.c:2082:            node_width(node) = D2Fix(width);
./XeTeX_ext.c:2105:                    glyphAdvances[i] = D2Fix(advances[i]);
./XeTeX_ext.c:2106:                    locations[i].x = D2Fix(positions[i].x);
./XeTeX_ext.c:2107:                    locations[i].y = D2Fix(positions[i].y);
./XeTeX_ext.c:2112:            node_width(node) = D2Fix(width);
./XeTeX_ext.c:2183:        node_height(node) = D2Fix(yMax);
./XeTeX_ext.c:2184:        node_depth(node) = -D2Fix(yMin);
./XeTeX_ext.c:2200:            return D2Fix(GetGlyphItalCorr_AAT((CFDictionaryRef)(fontlayoutengine[f]), glyphIDs[n-1]))
./XeTeX_ext.c:2204:            return D2Fix(getGlyphItalCorr((XeTeXLayoutEngine)(fontlayoutengine[f]), glyphIDs[n-1]))
./XeTeX_ext.c:2221:        return D2Fix(GetGlyphItalCorr_AAT((CFDictionaryRef)(fontlayoutengine[f]), gid));
./XeTeX_ext.c:2224:        return D2Fix(getGlyphItalCorr((XeTeXLayoutEngine)(fontlayoutengine[f]), gid));
./XeTeX_ext.c:2242:        node_width(node) = D2Fix(GetGlyphWidth_AAT(attributes, gid));
./XeTeX_ext.c:2250:        node_width(node) = D2Fix(getGlyphWidth(fontInst, gid));
./XeTeX_ext.c:2259:        node_height(node) = D2Fix(ht);
./XeTeX_ext.c:2260:        node_depth(node) = D2Fix(dp);
./XeTeX_ext.c:2318:Fixed D2Fix(double d)
./XeTeX_ext.c:2337:    *ascent = D2Fix(CTFontGetAscent(font));
./XeTeX_ext.c:2338:    *descent = D2Fix(CTFontGetDescent(font));
./XeTeX_ext.c:2339:    *xheight = D2Fix(CTFontGetXHeight(font));
./XeTeX_ext.c:2340:    *capheight = D2Fix(CTFontGetCapHeight(font));
./XeTeX_ext.c:2341:    *slant = D2Fix(tan(-CTFontGetSlantAngle(font) * M_PI / 180.0));
./XeTeX_ext.h:310:    Fixed   D2Fix(double d);
./XeTeX_mac.c:63:    return D2Fix(PStoTeXPoints(pts));
./xetex.defines:149:@define function D2Fix();
./xetex.web:30668:    width(tail):=D2Fix(xmax - xmin);
./xetex.web:30669:    height(tail):=D2Fix(ymax - ymin);
./xetex.web:30672:    pic_transform1(tail):=D2Fix(aField(t));
./xetex.web:30673:    pic_transform2(tail):=D2Fix(bField(t));
./xetex.web:30674:    pic_transform3(tail):=D2Fix(cField(t));
./xetex.web:30675:    pic_transform4(tail):=D2Fix(dField(t));
./xetex.web:30676:    pic_transform5(tail):=D2Fix(xField(t));
./xetex.web:30677:    pic_transform6(tail):=D2Fix(yField(t));

Grep finished at Wed Feb  7 13:15:42 2024


More information about the tex-live mailing list.