From 8f5ef4838331b2ad92a6c12994a6e2ddadb39af3 Mon Sep 17 00:00:00 2001 From: Omikhleia Date: Sat, 9 Dec 2023 18:29:18 +0100 Subject: [PATCH 1/2] fix(packages): Adjust dropcap logic for letters with a depth --- packages/dropcaps/init.lua | 118 +++++++++++++++++++++++++++++++++---- 1 file changed, 108 insertions(+), 10 deletions(-) diff --git a/packages/dropcaps/init.lua b/packages/dropcaps/init.lua index 764de53df..339290331 100644 --- a/packages/dropcaps/init.lua +++ b/packages/dropcaps/init.lua @@ -7,18 +7,61 @@ function package:_init () base._init(self) self:loadPackage("rebox") self:loadPackage("raiselower") + self:loadPackage("rules") end -local shapeHbox = function (options, content) - -- Clear irrelevant values before passing to font - options.lines, options.join, options.raise, options.shift, options.color, options.scale = nil, nil, nil, nil, nil, nil - SILE.call("noindent") +function package.declareSettings (_) + SILE.settings:declare({ + parameter = "dropcaps.bsratio", + type = "number or nil", + default = nil, -- nil means "use computed value based on font metrics" + help = "When set, fixed default ratio of the descender with respect to the baseline (around 0.3 in usual fonts)." + }) +end + +local function shapeHbox (options, content) local hbox = SILE.typesetter:makeHbox(function () SILE.call("font", options, content) end) return hbox end +local metrics = require("fontmetrics") +local bsratiocache = {} + +local computeBaselineRatio = function () + local fontoptions = SILE.font.loadDefaults({}) + local bsratio = bsratiocache[SILE.font._key(fontoptions)] + if not bsratio then + local face = SILE.font.cache(fontoptions, SILE.shaper.getFace) + local m = metrics.get_typographic_extents(face) + bsratio = m.descender / (m.ascender + m.descender) + bsratiocache[SILE.font._key(fontoptions)] = bsratio + end + return bsratio +end + +local function getToleranceDepth () + -- In non-strict mode, we allow using more lines to fit the dropcap. + -- However we cannot just check if the "extra depth" of the dropcap is above 0. + -- First, our depth adjustment is but a best attempt. + -- Moreover, some characters may have a small depth of their own (ex. "O" in Gentium Plus) + -- We must just ensure they stay within "reasonable bounds" with respect to the baseline, + -- so as not to flow over the next lines. + -- We compute a tolerance ratio based on the font metrics, expecting the font to be well-designed. + -- The user can override the computation and set the dropcaps.bsratio setting manually. + -- (LaTeX would likely approximate it using a \strut = with a depth ratio of 0.3bs) + local bsratio + if SILE.settings:get("dropcaps.bsratio") then + bsratio = SILE.settings:get("dropcaps.bsratio") + SU.debug("dropcaps", "Using user-defined descender baseline ratio", bsratio) + else + bsratio = computeBaselineRatio() + SU.debug("dropcaps", "Using computed descender baseline ratio", bsratio) + end + return bsratio * SILE.measurement("1bs"):tonumber() +end + function package:registerCommands () -- This implementation relies on the hangafter and hangindent features of Knuth's line-breaking algorithm. @@ -31,41 +74,83 @@ function package:registerCommands () local shift = SU.cast("measurement", options.shift or 0) local size = SU.cast("measurement or nil", options.size or nil) local scale = SU.cast("number", options.scale or 1.0) + local strict = SU.boolean(options.strict, true) + if strict and options.depthadjust then + SU.warn("The depthadjust option is ignored in strict mode.") + end local color = options.color - options.size = nil -- we need to measure the "would have been" size before using this + -- We need to measure the "would have been" size before using this. + options.size = nil + -- Clear irrelevant option values before passing to font and measuring content. + options.lines, options.join, options.raise, options.shift, options.color, options.scale = nil, nil, nil, nil, nil, nil if color then self:loadPackage("color") end + -- Some initial capital fonts have all their glyphs hanging below the baseline (e.g. EB Garamond Initials) + -- We cannot manage all pathological cases. + -- Quite empirically, we can shape character(s) which shouldn't usually have a depth normally. + -- If it has, then likely all glyphs do also and we need to compensate for that everywhere. + local depthadjust = options.depthadjust or "I" + local depthAdjustment = not strict and shapeHbox(options, { depthadjust }).depth:tonumber() or 0 + SU.debug("dropcaps", "Depth adjustment", depthAdjustment) + -- We want the drop cap to span over N lines, that is N - 1 baselineskip + the height of the first line. -- Note this only works for the default linespace mechanism. -- We determine the height of the first line by measuring the size the initial content *would have* been. - -- This gives the font some control over its relative size, sometimes desired sometimes undesired. local tmpHbox = shapeHbox(options, content) local extraHeight = SILE.measurement((lines - 1).."bs"):tonumber() - local targetHeight = tmpHbox.height:tonumber() * scale + extraHeight + local curHeight = tmpHbox.height:tonumber() + depthAdjustment + local targetHeight = (curHeight - depthAdjustment) * scale + extraHeight + if strict then + -- Take into account the compensated depth of the initial + curHeight = curHeight + tmpHbox.depth:tonumber() + end SU.debug("dropcaps", "Target height", targetHeight) -- Now we need to figure out how to scale the dropcap font to get an initial of targetHeight. -- From that we can also figure out the width it will be at that height. local curSize = SILE.measurement(SILE.settings:get("font.size")):tonumber() - local curHeight, curWidth = tmpHbox.height:tonumber(), tmpHbox.width:tonumber() + local curWidth = tmpHbox.width:tonumber() options.size = size and size:tonumber() or (targetHeight / curHeight * curSize) local targetWidth = curWidth / curSize * options.size SU.debug("dropcaps", "Target font size", options.size) SU.debug("dropcaps", "Target width", targetWidth) - -- Typeset the dropcap with its final shape, but don't output it yet + -- Typeset the dropcap with its final shape, but don't output it yet. local hbox = shapeHbox(options, content) + if not strict then + -- Compensation for regular extra depth. + local compensationHeight = depthAdjustment * options.size / curSize + SU.debug("dropcaps", "Compensation height", compensationHeight) + + -- Some fonts have descenders on letters such as Q, J, etc. + -- In that case we may need extra lines to the dropcap. + local extraDepth = hbox.depth:tonumber() - compensationHeight + local toleranceDepth = getToleranceDepth() + if extraDepth > toleranceDepth then + SU.debug("dropcaps", "Extra depth", extraDepth, "> tolerance", toleranceDepth) + local extraLines = math.ceil((extraDepth - toleranceDepth) / SILE.measurement("1bs"):tonumber()) + lines = lines + extraLines + SU.debug("dropcaps", "Extra lines needed to fit", extraLines) + else + SU.debug("dropcaps", "Extra depth", extraDepth, "< tolerance", toleranceDepth) + end + raise = raise:tonumber() + compensationHeight + else + raise = raise:tonumber() + hbox.depth:tonumber() + end + -- Setup up the necessary indents for the final paragraph content local joinOffset = join and standoff:tonumber() or 0 SILE.settings:set("current.hangAfter", -lines) SILE.settings:set("current.hangIndent", targetWidth + joinOffset) + SILE.call("noindent") SU.debug("dropcaps", "joinOffset", joinOffset) -- The paragraph is indented so as to leave enough space for the drop cap. -- We "trick" the typesetter with a zero-dimension box wrapping our original box. - SILE.call("rebox", { height = 0, width = -joinOffset }, function () + SILE.call("rebox", { height = 0, depth = 0, width = -joinOffset }, function () SILE.call("glue", { width = shift - targetWidth - joinOffset }) SILE.call("lower", { height = extraHeight - raise }, function () SILE.call(color and "color" or "noop", { color = color }, function () @@ -79,6 +164,7 @@ end package.documentation = [[ \begin{document} +\use[module=packages.dropcaps] The \autodoc:package{dropcaps} package allows you to format paragraphs with an “initial capital” (also commonly referred as a “drop cap”), typically one large capital letter used as a decorative element at the beginning of a paragraph. It provides the \autodoc:command{\dropcap} command. @@ -92,6 +178,18 @@ To tweak the position of the dropcap, measurements may be passed to the \autodoc Other options passed to \autodoc:command{\dropcap} will be passed through to \autodoc:command{\font} when drawing the initial letter(s). This may be useful for passing OpenType options or other font preferences. +Some fonts have capitals — such as, typically, \autodoc:example{Q} and \autodoc:example{J} — hanging below the baseline. +By default, the dropcap fits the specified number of lines and the characters are typeset in a smaller size to fit these descenders. + +With the \autodoc:parameter{strict=false} option, the characters are scaled with respect to their height only, and extra hanged lines are added to the dropcap in order to accommodate the descenders. +The dropcap is allowed to overflow the baseline by a reasonable amount, before triggering the addition of extra lines, for fonts that have capitals very slightly hanging below the baseline. +This tolerance is computed based on the font metrics. +If you want to bypass this mechanism and adjust the tolerance, you can use the \autodoc:setting{dropcaps.bsratio} setting. + +Moreover, some fonts, such as EB Garamond Initials, have \em{all} capitals hanging below the baseline. +To take this case into account in non-strict mode, the depth adjustment of the dropcap is empirically corrected based on that of a character which shouldn't have any, by default an \autodoc:example{I}. +The character(s) used for this depth adjustment correction can be specified using the \autodoc:parameter{depthadjust} option. + \begin{autodoc:note} One caveat is that the size of the initials is calculated using the default linespacing mechanism. If you are using an alternative method from the \autodoc:package{linespacing} package, you might see strange results. From 85a20373c5696a3af5d1c7ee9f97b9e6079bdfd4 Mon Sep 17 00:00:00 2001 From: Omikhleia Date: Thu, 21 Dec 2023 17:50:53 +0100 Subject: [PATCH 2/2] test(packages): Add test for non-strict dropcaps with descenders --- tests/dropcaps-descenders.expected | 947 +++++++++++++++++++++++++++++ tests/dropcaps-descenders.sil | 31 + 2 files changed, 978 insertions(+) create mode 100644 tests/dropcaps-descenders.expected create mode 100644 tests/dropcaps-descenders.sil diff --git a/tests/dropcaps-descenders.expected b/tests/dropcaps-descenders.expected new file mode 100644 index 000000000..2e26616c4 --- /dev/null +++ b/tests/dropcaps-descenders.expected @@ -0,0 +1,947 @@ +Set paper size 297.6377985 419.5275636 +Begin page +Mx 32.5576 +My 28.9514 +Mx 14.8819 +My 55.3514 +Set font Cormorant Infant;53.24;400;;normal;;;LTR +T 74 w=17.6757 (I) +Mx 32.5576 +My 28.9514 +Set font Cormorant Infant;11;400;;normal;;;LTR +T 550 597 679 w=12.3310 (bis) +Mx 49.8658 +Mx 2.8380 +Mx 5.2690 +Mx 3.8720 +Mx 4.4880 +Mx 8.3930 +T 620 a=2.8380 642 a=5.2690 672 a=4.0040 563 a=4.4880 629 a=8.3930 (lorem) +Mx 79.7030 +T 597 669 679 699 629 w=26.1580 (ipsum) +Mx 110.8381 +T 557 642 620 642 672 w=23.0120 (dolor) +Mx 138.8273 +T 679 597 690 w=10.4390 (sit) +Mx 154.2435 +T 522 629 563 690 w=21.9890 (amet) +Mx 176.2325 +T 2367 w=2.4420 (,) +Mx 183.6517 +Mx 4.4550 +Mx 5.2690 +Mx 5.6870 +Mx 3.7180 +Mx 4.4220 +Mx 4.5210 +Mx 3.7180 +Mx 4.4880 +Mx 3.7180 +Mx 5.4230 +Mx 4.0040 +T 551 a=4.5210 642 a=5.2690 632 a=5.6870 679 a=3.7180 563 a=4.4880 551 a=4.5210 690 a=3.7180 563 a=4.4880 690 a=3.7180 699 a=5.4230 672 a=4.0040 (consectetur) +Mx 238.0519 +T 522 557 597 669 597 679 551 597 632 583 w=44.7040 (adipiscing) +Mx 32.5576 +My 42.1514 +T 563 620 597 690 w=14.0470 (elit) +Mx 46.6046 +T 2366 w=2.1670 (.) +Mx 51.8575 +Mx 5.4010 +Mx 4.4220 +Mx 5.6320 +T 152 a=5.4010 563 a=4.4880 557 a=5.6320 (Sed) +Mx 70.3984 +T 632 642 632 w=16.6430 (non) +Mx 90.1273 +T 672 597 679 699 679 w=19.8660 (risus) +Mx 109.9933 +T 2366 w=2.1670 (.) +Mx 115.2462 +Mx 5.4010 +Mx 5.4230 +Mx 3.7180 +Mx 5.6210 +Mx 4.4880 +Mx 5.6870 +Mx 5.6320 +Mx 3.0030 +Mx 3.6520 +Mx 3.7180 +Mx 4.4880 +T 152 a=5.4010 699 a=5.4230 679 a=3.7180 669 a=5.6210 563 a=4.4880 632 a=5.6870 557 a=5.6320 597 a=3.0030 679 a=3.7180 679 a=3.7180 563 a=4.4880 (Suspendisse) +Mx 169.1632 +Mx 2.8380 +Mx 4.4220 +Mx 4.5210 +Mx 3.7180 +Mx 5.4230 +Mx 3.7180 +T 620 a=2.8380 563 a=4.4880 551 a=4.5210 690 a=3.7180 699 a=5.4230 679 a=3.7180 (lectus) +Mx 196.8891 +Mx 3.7180 +Mx 5.2690 +Mx 4.0040 +Mx 3.7180 +Mx 5.2690 +Mx 3.6190 +T 690 a=3.7180 642 a=5.2690 672 a=4.0040 690 a=3.7180 642 a=5.2690 672 a=4.0040 (tortor) +T 2367 w=2.4420 (,) +Mx 228.0140 +Mx 5.6320 +Mx 3.0030 +Mx 5.1260 +Mx 5.6870 +Mx 3.0030 +Mx 3.6520 +Mx 3.7180 +Mx 3.0030 +Mx 8.3930 +T 557 a=5.6320 597 a=3.0030 583 a=5.1260 632 a=5.6870 597 a=3.0030 679 a=3.7180 679 a=3.7180 597 a=3.0030 629 a=8.3930 (dignissim) +Mx 272.3169 +T 679 597 690 w=10.4390 (sit) +Mx 32.5576 +My 55.3514 +T 522 629 563 690 w=21.9890 (amet) +Mx 54.5466 +T 2367 w=2.4420 (,) +Mx 59.8208 +T 522 557 597 669 597 679 551 597 632 583 w=44.7040 (adipiscing) +Mx 107.3570 +Mx 5.6870 +Mx 4.4220 +Mx 4.5210 +T 632 a=5.6870 563 a=4.4880 551 a=4.5210 (nec) +T 2367 w=2.4420 (,) +Mx 127.2611 +T 699 620 690 672 597 551 597 563 679 w=34.7160 (ultricies) +Mx 164.8093 +Mx 3.7180 +Mx 4.4220 +Mx 5.6320 +T 679 a=3.7180 563 a=4.4880 557 a=5.6320 (sed) +T 2367 w=2.4420 (,) +Mx 183.8555 +Mx 5.6320 +Mx 5.2690 +Mx 2.8380 +Mx 5.2690 +Mx 3.6190 +T 557 a=5.6320 642 a=5.2690 620 a=2.8380 642 a=5.2690 672 a=4.0040 (dolor) +T 2366 w=2.1670 (.) +Mx 211.4817 +Mx 7.5460 +Mx 3.8720 +Mx 5.3900 +Mx 3.7180 +T 30 a=7.5460 672 a=4.0040 522 a=5.3900 679 a=3.7180 (Cras) +Mx 234.8399 +T 563 620 563 629 563 632 690 699 629 w=47.9160 (elementum) +Mx 14.8819 +My 68.5514 +Mx 5.4230 +Mx 2.8380 +Mx 3.7180 +Mx 4.0040 +Mx 3.0030 +Mx 4.4550 +Mx 4.4880 +Mx 3.7180 +T 699 a=5.4230 620 a=2.8380 690 a=3.7180 672 a=4.0040 597 a=3.0030 551 a=4.5210 563 a=4.4880 679 a=3.7180 (ultrices) +Mx 49.6445 +T 557 597 522 629 w=22.4180 (diam) +Mx 72.0625 +T 2366 w=2.1670 (.) +Mx 27.2116 +My 81.7514 +Mx 14.8819 +My 98.8083 +Set font Cormorant Infant;38.2911;400;;normal;;;LTR +T 88 w=12.3297 (J) +Mx 27.2116 +My 81.7514 +Set font Cormorant Infant;11;400;;normal;;;LTR +T 522 632 699 522 w=21.8900 (anua) +Mx 53.4770 +Mx 2.8380 +Mx 5.2690 +Mx 3.8720 +Mx 4.4880 +Mx 8.3930 +T 620 a=2.8380 642 a=5.2690 672 a=4.0040 563 a=4.4880 629 a=8.3930 (lorem) +Mx 82.7123 +T 597 669 679 699 629 w=26.1580 (ipsum) +Mx 113.2456 +T 557 642 620 642 672 w=23.0120 (dolor) +Mx 140.6329 +T 679 597 690 w=10.4390 (sit) +Mx 155.4473 +T 522 629 563 690 w=21.9890 (amet) +Mx 177.4363 +T 2367 w=2.4420 (,) +Mx 184.2536 +Mx 4.4550 +Mx 5.2690 +Mx 5.6870 +Mx 3.7180 +Mx 4.4220 +Mx 4.5210 +Mx 3.7180 +Mx 4.4880 +Mx 3.7180 +Mx 5.4230 +Mx 4.0040 +T 551 a=4.5210 642 a=5.2690 632 a=5.6870 679 a=3.7180 563 a=4.4880 551 a=4.5210 690 a=3.7180 563 a=4.4880 690 a=3.7180 699 a=5.4230 672 a=4.0040 (consectetur) +Mx 238.0519 +T 522 557 597 669 597 679 551 597 632 583 w=44.7040 (adipiscing) +Mx 27.2116 +My 94.9514 +T 563 620 597 690 w=14.0470 (elit) +Mx 41.2586 +T 2366 w=2.1670 (.) +Mx 47.1798 +Mx 5.4010 +Mx 4.4220 +Mx 5.6320 +T 152 a=5.4010 563 a=4.4880 557 a=5.6320 (Sed) +Mx 66.3890 +T 632 642 632 w=16.6430 (non) +Mx 86.7861 +T 672 597 679 699 679 w=19.8660 (risus) +Mx 106.6521 +T 2366 w=2.1670 (.) +Mx 112.5733 +Mx 5.4010 +Mx 5.4230 +Mx 3.7180 +Mx 5.6210 +Mx 4.4880 +Mx 5.6870 +Mx 5.6320 +Mx 3.0030 +Mx 3.6520 +Mx 3.7180 +Mx 4.4880 +T 152 a=5.4010 699 a=5.4230 679 a=3.7180 669 a=5.6210 563 a=4.4880 632 a=5.6870 557 a=5.6320 597 a=3.0030 679 a=3.7180 679 a=3.7180 563 a=4.4880 (Suspendisse) +Mx 167.1584 +Mx 2.8380 +Mx 4.4220 +Mx 4.5210 +Mx 3.7180 +Mx 5.4230 +Mx 3.7180 +T 620 a=2.8380 563 a=4.4880 551 a=4.5210 690 a=3.7180 699 a=5.4230 679 a=3.7180 (lectus) +Mx 195.5526 +Mx 3.7180 +Mx 5.2690 +Mx 4.0040 +Mx 3.7180 +Mx 5.2690 +Mx 3.6190 +T 690 a=3.7180 642 a=5.2690 672 a=4.0040 690 a=3.7180 642 a=5.2690 672 a=4.0040 (tortor) +T 2367 w=2.4420 (,) +Mx 227.3457 +Mx 5.6320 +Mx 3.0030 +Mx 5.1260 +Mx 5.6870 +Mx 3.0030 +Mx 3.6520 +Mx 3.7180 +Mx 3.0030 +Mx 8.3930 +T 557 a=5.6320 597 a=3.0030 583 a=5.1260 632 a=5.6870 597 a=3.0030 679 a=3.7180 679 a=3.7180 597 a=3.0030 629 a=8.3930 (dignissim) +Mx 272.3169 +T 679 597 690 w=10.4390 (sit) +Mx 27.2116 +My 108.1514 +T 522 629 563 690 w=21.9890 (amet) +Mx 49.2006 +T 2367 w=2.4420 (,) +Mx 55.2385 +T 522 557 597 669 597 679 551 597 632 583 w=44.7040 (adipiscing) +Mx 103.5384 +Mx 5.6870 +Mx 4.4220 +Mx 4.5210 +T 632 a=5.6870 563 a=4.4880 551 a=4.5210 (nec) +T 2367 w=2.4420 (,) +Mx 124.2063 +T 699 620 690 672 597 551 597 563 679 w=34.7160 (ultricies) +Mx 162.5182 +Mx 3.7180 +Mx 4.4220 +Mx 5.6320 +T 679 a=3.7180 563 a=4.4880 557 a=5.6320 (sed) +T 2367 w=2.4420 (,) +Mx 182.3281 +Mx 5.6320 +Mx 5.2690 +Mx 2.8380 +Mx 5.2690 +Mx 3.6190 +T 557 a=5.6320 642 a=5.2690 620 a=2.8380 642 a=5.2690 672 a=4.0040 (dolor) +T 2366 w=2.1670 (.) +Mx 210.7180 +Mx 7.5460 +Mx 3.8720 +Mx 5.3900 +Mx 3.7180 +T 30 a=7.5460 672 a=4.0040 522 a=5.3900 679 a=3.7180 (Cras) +Mx 234.8399 +T 563 620 563 629 563 632 690 699 629 w=47.9160 (elementum) +Mx 14.8819 +My 121.3514 +Mx 5.4230 +Mx 2.8380 +Mx 3.7180 +Mx 4.0040 +Mx 3.0030 +Mx 4.4550 +Mx 4.4880 +Mx 3.7180 +T 699 a=5.4230 620 a=2.8380 690 a=3.7180 672 a=4.0040 597 a=3.0030 551 a=4.5210 563 a=4.4880 679 a=3.7180 (ultrices) +Mx 49.6445 +T 557 597 522 629 w=22.4180 (diam) +Mx 72.0625 +T 2366 w=2.1670 (.) +Mx 32.0252 +My 134.5514 +Mx 14.8819 +My 160.9514 +Set font Cormorant Infant;53.24;400;;normal;;;LTR +T 88 w=17.1433 (J) +Mx 32.0252 +My 134.5514 +Set font Cormorant Infant;11;400;;normal;;;LTR +T 522 632 699 522 w=21.8900 (anua) +Mx 57.6028 +Mx 2.8380 +Mx 5.2690 +Mx 3.8720 +Mx 4.4880 +Mx 8.3930 +T 620 a=2.8380 642 a=5.2690 672 a=4.0040 563 a=4.4880 629 a=8.3930 (lorem) +Mx 86.1505 +T 597 669 679 699 629 w=26.1580 (ipsum) +Mx 115.9962 +T 557 642 620 642 672 w=23.0120 (dolor) +Mx 142.6959 +T 679 597 690 w=10.4390 (sit) +Mx 156.8226 +T 522 629 563 690 w=21.9890 (amet) +Mx 178.8116 +T 2367 w=2.4420 (,) +Mx 184.9412 +Mx 4.4550 +Mx 5.2690 +Mx 5.6870 +Mx 3.7180 +Mx 4.4220 +Mx 4.5210 +Mx 3.7180 +Mx 4.4880 +Mx 3.7180 +Mx 5.4230 +Mx 4.0040 +T 551 a=4.5210 642 a=5.2690 632 a=5.6870 679 a=3.7180 563 a=4.4880 551 a=4.5210 690 a=3.7180 563 a=4.4880 690 a=3.7180 699 a=5.4230 672 a=4.0040 (consectetur) +Mx 238.0519 +T 522 557 597 669 597 679 551 597 632 583 w=44.7040 (adipiscing) +Mx 32.0252 +My 147.7514 +T 563 620 597 690 w=14.0470 (elit) +Mx 46.0722 +T 2366 w=2.1670 (.) +Mx 51.3916 +Mx 5.4010 +Mx 4.4220 +Mx 5.6320 +T 152 a=5.4010 563 a=4.4880 557 a=5.6320 (Sed) +Mx 69.9991 +T 632 642 632 w=16.6430 (non) +Mx 89.7946 +T 672 597 679 699 679 w=19.8660 (risus) +Mx 109.6606 +T 2366 w=2.1670 (.) +Mx 114.9800 +Mx 5.4010 +Mx 5.4230 +Mx 3.7180 +Mx 5.6210 +Mx 4.4880 +Mx 5.6870 +Mx 5.6320 +Mx 3.0030 +Mx 3.6520 +Mx 3.7180 +Mx 4.4880 +T 152 a=5.4010 699 a=5.4230 679 a=3.7180 669 a=5.6210 563 a=4.4880 632 a=5.6870 557 a=5.6320 597 a=3.0030 679 a=3.7180 679 a=3.7180 563 a=4.4880 (Suspendisse) +Mx 168.9635 +Mx 2.8380 +Mx 4.4220 +Mx 4.5210 +Mx 3.7180 +Mx 5.4230 +Mx 3.7180 +T 620 a=2.8380 563 a=4.4880 551 a=4.5210 690 a=3.7180 699 a=5.4230 679 a=3.7180 (lectus) +Mx 196.7560 +Mx 3.7180 +Mx 5.2690 +Mx 4.0040 +Mx 3.7180 +Mx 5.2690 +Mx 3.6190 +T 690 a=3.7180 642 a=5.2690 672 a=4.0040 690 a=3.7180 642 a=5.2690 672 a=4.0040 (tortor) +T 2367 w=2.4420 (,) +Mx 227.9474 +Mx 5.6320 +Mx 3.0030 +Mx 5.1260 +Mx 5.6870 +Mx 3.0030 +Mx 3.6520 +Mx 3.7180 +Mx 3.0030 +Mx 8.3930 +T 557 a=5.6320 597 a=3.0030 583 a=5.1260 632 a=5.6870 597 a=3.0030 679 a=3.7180 679 a=3.7180 597 a=3.0030 629 a=8.3930 (dignissim) +Mx 272.3169 +T 679 597 690 w=10.4390 (sit) +Mx 32.0252 +My 160.9514 +T 522 629 563 690 w=21.9890 (amet) +Mx 54.0142 +T 2367 w=2.4420 (,) +Mx 59.3644 +T 522 557 597 669 597 679 551 597 632 583 w=44.7040 (adipiscing) +Mx 106.9767 +Mx 5.6870 +Mx 4.4220 +Mx 4.5210 +T 632 a=5.6870 563 a=4.4880 551 a=4.5210 (nec) +T 2367 w=2.4420 (,) +Mx 126.9569 +T 699 620 690 672 597 551 597 563 679 w=34.7160 (ultricies) +Mx 164.5812 +Mx 3.7180 +Mx 4.4220 +Mx 5.6320 +T 679 a=3.7180 563 a=4.4880 557 a=5.6320 (sed) +T 2367 w=2.4420 (,) +Mx 183.7034 +Mx 5.6320 +Mx 5.2690 +Mx 2.8380 +Mx 5.2690 +Mx 3.6190 +T 557 a=5.6320 642 a=5.2690 620 a=2.8380 642 a=5.2690 672 a=4.0040 (dolor) +T 2366 w=2.1670 (.) +Mx 211.4057 +Mx 7.5460 +Mx 3.8720 +Mx 5.3900 +Mx 3.7180 +T 30 a=7.5460 672 a=4.0040 522 a=5.3900 679 a=3.7180 (Cras) +Mx 234.8399 +T 563 620 563 629 563 632 690 699 629 w=47.9160 (elementum) +Mx 32.0252 +My 174.1514 +Mx 5.4230 +Mx 2.8380 +Mx 3.7180 +Mx 4.0040 +Mx 3.0030 +Mx 4.4550 +Mx 4.4880 +Mx 3.7180 +T 699 a=5.4230 620 a=2.8380 690 a=3.7180 672 a=4.0040 597 a=3.0030 551 a=4.5210 563 a=4.4880 679 a=3.7180 (ultrices) +Mx 68.4284 +T 557 597 522 629 w=22.4180 (diam) +Mx 90.8464 +T 2366 w=2.1670 (.) +Mx 97.7697 +Mx 9.1960 +Mx 5.3900 +Mx 4.4220 +Mx 4.4550 +Mx 4.4880 +Mx 5.6870 +Mx 5.3900 +Mx 3.7180 +T 103 a=9.1960 522 a=5.3900 563 a=4.4880 551 a=4.5210 563 a=4.4880 632 a=5.6870 522 a=5.3900 679 a=3.7180 (Maecenas) +Mx 145.2719 +T 620 597 583 699 620 522 w=24.6180 (ligula) +Mx 174.6462 +Mx 8.3930 +Mx 5.3900 +Mx 3.6520 +Mx 3.7180 +Mx 5.3900 +T 629 a=8.3930 522 a=5.3900 679 a=3.7180 679 a=3.7180 522 a=5.3900 (massa) +T 2367 w=2.4420 (,) +Mx 208.3874 +T 723 522 672 597 699 679 w=26.3120 (varius) +Mx 239.4557 +T 522 w=5.3900 (a) +Mx 244.8457 +T 2367 w=2.4420 (,) +Mx 252.0439 +T 679 563 629 669 563 672 w=30.7120 (semper) +Mx 14.8819 +My 187.3514 +Mx 4.4550 +Mx 5.2690 +Mx 5.6870 +Mx 5.1260 +Mx 5.4230 +Mx 4.4880 +T 551 a=4.5210 642 a=5.2690 632 a=5.6870 583 a=5.1260 699 a=5.4230 563 a=4.4880 (congue) +T 2367 w=2.4420 (,) +Mx 50.8809 +T 563 699 597 679 629 642 557 w=35.9260 (euismod) +Mx 89.9159 +T 632 642 632 w=16.6430 (non) +Mx 106.5589 +T 2367 w=2.4420 (,) +Mx 112.1099 +T 629 597 w=11.3960 (mi) +Mx 123.5059 +T 2366 w=2.1670 (.) +Mx 39.2060 +My 200.5514 +Mx 14.8819 +My 213.7514 +Set font Cormorant Infant;31.7547;400;;normal;;;LTR +T 115 w=24.3241 (O) +Mx 39.2060 +My 200.5514 +Set font Cormorant Infant;11;400;;normal;;;LTR +T 557 642 679 w=14.6190 (dos) +Mx 57.5256 +Mx 2.8380 +Mx 5.2690 +Mx 3.8720 +Mx 4.4880 +Mx 8.3930 +T 620 a=2.8380 642 a=5.2690 672 a=4.0040 563 a=4.4880 629 a=8.3930 (lorem) +Mx 86.0861 +T 597 669 679 699 629 w=26.1580 (ipsum) +Mx 115.9447 +T 557 642 620 642 672 w=23.0120 (dolor) +Mx 142.6572 +T 679 597 690 w=10.4390 (sit) +Mx 156.7968 +T 522 629 563 690 w=21.9890 (amet) +Mx 178.7858 +T 2367 w=2.4420 (,) +Mx 184.9284 +Mx 4.4550 +Mx 5.2690 +Mx 5.6870 +Mx 3.7180 +Mx 4.4220 +Mx 4.5210 +Mx 3.7180 +Mx 4.4880 +Mx 3.7180 +Mx 5.4230 +Mx 4.0040 +T 551 a=4.5210 642 a=5.2690 632 a=5.6870 679 a=3.7180 563 a=4.4880 551 a=4.5210 690 a=3.7180 563 a=4.4880 690 a=3.7180 699 a=5.4230 672 a=4.0040 (consectetur) +Mx 238.0519 +T 522 557 597 669 597 679 551 597 632 583 w=44.7040 (adipiscing) +Mx 39.2060 +My 213.7514 +T 563 620 597 690 w=14.0470 (elit) +Mx 53.2530 +T 2366 w=2.1670 (.) +Mx 59.4883 +Mx 5.4010 +Mx 4.4220 +Mx 5.6320 +T 152 a=5.4010 563 a=4.4880 557 a=5.6320 (Sed) +Mx 79.0115 +T 632 642 632 w=16.6430 (non) +Mx 99.7228 +T 672 597 679 699 679 w=19.8660 (risus) +Mx 119.5888 +T 2366 w=2.1670 (.) +Mx 125.8241 +Mx 5.4010 +Mx 5.4230 +Mx 3.7180 +Mx 5.6210 +Mx 4.4880 +Mx 5.6870 +Mx 5.6320 +Mx 3.0030 +Mx 3.6520 +Mx 3.7180 +Mx 4.4880 +T 152 a=5.4010 699 a=5.4230 679 a=3.7180 669 a=5.6210 563 a=4.4880 632 a=5.6870 557 a=5.6320 597 a=3.0030 679 a=3.7180 679 a=3.7180 563 a=4.4880 (Suspendisse) +Mx 180.7234 +Mx 2.8380 +Mx 4.4220 +Mx 4.5210 +Mx 3.7180 +Mx 5.4230 +Mx 3.7180 +T 620 a=2.8380 563 a=4.4880 551 a=4.5210 690 a=3.7180 699 a=5.4230 679 a=3.7180 (lectus) +Mx 209.4316 +Mx 3.7180 +Mx 5.2690 +Mx 4.0040 +Mx 3.7180 +Mx 5.2690 +Mx 3.6190 +T 690 a=3.7180 642 a=5.2690 672 a=4.0040 690 a=3.7180 642 a=5.2690 672 a=4.0040 (tortor) +T 2367 w=2.4420 (,) +Mx 241.5389 +Mx 5.6320 +Mx 3.0030 +Mx 5.1260 +Mx 5.6870 +Mx 3.0030 +Mx 3.6520 +Mx 3.7180 +Mx 3.0030 +Mx 8.3930 +T 557 a=5.6320 597 a=3.0030 583 a=5.1260 632 a=5.6870 597 a=3.0030 679 a=3.7180 679 a=3.7180 597 a=3.0030 629 a=8.3930 (dignissim) +Mx 14.8819 +My 226.9514 +T 679 597 690 w=10.4390 (sit) +Mx 28.7036 +T 522 629 563 690 w=21.9890 (amet) +Mx 50.6926 +T 2367 w=2.4420 (,) +Mx 56.5174 +T 522 557 597 669 597 679 551 597 632 583 w=44.7040 (adipiscing) +Mx 104.6041 +Mx 5.6870 +Mx 4.4220 +Mx 4.5210 +T 632 a=5.6870 563 a=4.4880 551 a=4.5210 (nec) +T 2367 w=2.4420 (,) +Mx 125.0589 +T 699 620 690 672 597 551 597 563 679 w=34.7160 (ultricies) +Mx 163.1577 +Mx 3.7180 +Mx 4.4220 +Mx 5.6320 +T 679 a=3.7180 563 a=4.4880 557 a=5.6320 (sed) +T 2367 w=2.4420 (,) +Mx 182.7544 +Mx 5.6320 +Mx 5.2690 +Mx 2.8380 +Mx 5.2690 +Mx 3.6190 +T 557 a=5.6320 642 a=5.2690 620 a=2.8380 642 a=5.2690 672 a=4.0040 (dolor) +T 2366 w=2.1670 (.) +Mx 210.9312 +Mx 7.5460 +Mx 3.8720 +Mx 5.3900 +Mx 3.7180 +T 30 a=7.5460 672 a=4.0040 522 a=5.3900 679 a=3.7180 (Cras) +Mx 234.8399 +T 563 620 563 629 563 632 690 699 629 w=47.9160 (elementum) +Mx 14.8819 +My 240.1514 +Mx 5.4230 +Mx 2.8380 +Mx 3.7180 +Mx 4.0040 +Mx 3.0030 +Mx 4.4550 +Mx 4.4880 +Mx 3.7180 +T 699 a=5.4230 620 a=2.8380 690 a=3.7180 672 a=4.0040 597 a=3.0030 551 a=4.5210 563 a=4.4880 679 a=3.7180 (ultrices) +Mx 49.6445 +T 557 597 522 629 w=22.4180 (diam) +Mx 72.0625 +T 2366 w=2.1670 (.) +Mx 33.7709 +My 253.3514 +Mx 14.8819 +My 262.0387 +Set font Cormorant Infant;24.6593;400;;normal;;;LTR +T 144 w=18.8890 (Q) +Mx 33.7709 +My 253.3514 +Set font Cormorant Infant;11;400;;normal;;;LTR +T 699 642 w=10.6920 (uo) +Mx 49.5009 +Mx 2.8380 +Mx 5.2690 +Mx 3.8720 +Mx 4.4880 +Mx 8.3930 +T 620 a=2.8380 642 a=5.2690 672 a=4.0040 563 a=4.4880 629 a=8.3930 (lorem) +Mx 79.3989 +T 597 669 679 699 629 w=26.1580 (ipsum) +Mx 110.5949 +T 557 642 620 642 672 w=23.0120 (dolor) +Mx 138.6449 +T 679 597 690 w=10.4390 (sit) +Mx 154.1219 +T 522 629 563 690 w=21.9890 (amet) +Mx 176.1109 +T 2367 w=2.4420 (,) +Mx 183.5909 +Mx 4.4550 +Mx 5.2690 +Mx 5.6870 +Mx 3.7180 +Mx 4.4220 +Mx 4.5210 +Mx 3.7180 +Mx 4.4880 +Mx 3.7180 +Mx 5.4230 +Mx 4.0040 +T 551 a=4.5210 642 a=5.2690 632 a=5.6870 679 a=3.7180 563 a=4.4880 551 a=4.5210 690 a=3.7180 563 a=4.4880 690 a=3.7180 699 a=5.4230 672 a=4.0040 (consectetur) +Mx 238.0519 +T 522 557 597 669 597 679 551 597 632 583 w=44.7040 (adipiscing) +Mx 33.7709 +My 266.5514 +T 563 620 597 690 w=14.0470 (elit) +Mx 47.8179 +T 2366 w=2.1670 (.) +Mx 52.9192 +Mx 5.4010 +Mx 4.4220 +Mx 5.6320 +T 152 a=5.4010 563 a=4.4880 557 a=5.6320 (Sed) +Mx 71.3084 +T 632 642 632 w=16.6430 (non) +Mx 90.8857 +T 672 597 679 699 679 w=19.8660 (risus) +Mx 110.7517 +T 2366 w=2.1670 (.) +Mx 115.8529 +Mx 5.4010 +Mx 5.4230 +Mx 3.7180 +Mx 5.6210 +Mx 4.4880 +Mx 5.6870 +Mx 5.6320 +Mx 3.0030 +Mx 3.6520 +Mx 3.7180 +Mx 4.4880 +T 152 a=5.4010 699 a=5.4230 679 a=3.7180 669 a=5.6210 563 a=4.4880 632 a=5.6870 557 a=5.6320 597 a=3.0030 679 a=3.7180 679 a=3.7180 563 a=4.4880 (Suspendisse) +Mx 169.6182 +Mx 2.8380 +Mx 4.4220 +Mx 4.5210 +Mx 3.7180 +Mx 5.4230 +Mx 3.7180 +T 620 a=2.8380 563 a=4.4880 551 a=4.5210 690 a=3.7180 699 a=5.4230 679 a=3.7180 (lectus) +Mx 197.1924 +Mx 3.7180 +Mx 5.2690 +Mx 4.0040 +Mx 3.7180 +Mx 5.2690 +Mx 3.6190 +T 690 a=3.7180 642 a=5.2690 672 a=4.0040 690 a=3.7180 642 a=5.2690 672 a=4.0040 (tortor) +T 2367 w=2.4420 (,) +Mx 228.1657 +Mx 5.6320 +Mx 3.0030 +Mx 5.1260 +Mx 5.6870 +Mx 3.0030 +Mx 3.6520 +Mx 3.7180 +Mx 3.0030 +Mx 8.3930 +T 557 a=5.6320 597 a=3.0030 583 a=5.1260 632 a=5.6870 597 a=3.0030 679 a=3.7180 679 a=3.7180 597 a=3.0030 629 a=8.3930 (dignissim) +Mx 272.3169 +T 679 597 690 w=10.4390 (sit) +Mx 14.8819 +My 279.7514 +T 522 629 563 690 w=21.9890 (amet) +Mx 36.8709 +T 2367 w=2.4420 (,) +Mx 42.4133 +T 522 557 597 669 597 679 551 597 632 583 w=44.7040 (adipiscing) +Mx 90.2178 +Mx 5.6870 +Mx 4.4220 +Mx 4.5210 +T 632 a=5.6870 563 a=4.4880 551 a=4.5210 (nec) +T 2367 w=2.4420 (,) +Mx 110.3902 +T 699 620 690 672 597 551 597 563 679 w=34.7160 (ultricies) +Mx 148.2066 +Mx 3.7180 +Mx 4.4220 +Mx 5.6320 +T 679 a=3.7180 563 a=4.4880 557 a=5.6320 (sed) +T 2367 w=2.4420 (,) +Mx 167.5211 +Mx 5.6320 +Mx 5.2690 +Mx 2.8380 +Mx 5.2690 +Mx 3.6190 +T 557 a=5.6320 642 a=5.2690 620 a=2.8380 642 a=5.2690 672 a=4.0040 (dolor) +T 2366 w=2.1670 (.) +Mx 39.2060 +My 292.9514 +Mx 14.8819 +My 306.1514 +Set font Cormorant Infant;31.7547;400;;normal;;;LTR +T 144 w=24.3241 (Q) +Mx 39.2060 +My 292.9514 +Set font Cormorant Infant;11;400;;normal;;;LTR +T 699 642 w=10.6920 (uo) +Mx 54.1596 +Mx 2.8380 +Mx 5.2690 +Mx 3.8720 +Mx 4.4880 +Mx 8.3930 +T 620 a=2.8380 642 a=5.2690 672 a=4.0040 563 a=4.4880 629 a=8.3930 (lorem) +Mx 83.2811 +T 597 669 679 699 629 w=26.1580 (ipsum) +Mx 113.7007 +T 557 642 620 642 672 w=23.0120 (dolor) +Mx 140.9742 +T 679 597 690 w=10.4390 (sit) +Mx 155.6748 +T 522 629 563 690 w=21.9890 (amet) +Mx 177.6638 +T 2367 w=2.4420 (,) +Mx 184.3674 +Mx 4.4550 +Mx 5.2690 +Mx 5.6870 +Mx 3.7180 +Mx 4.4220 +Mx 4.5210 +Mx 3.7180 +Mx 4.4880 +Mx 3.7180 +Mx 5.4230 +Mx 4.0040 +T 551 a=4.5210 642 a=5.2690 632 a=5.6870 679 a=3.7180 563 a=4.4880 551 a=4.5210 690 a=3.7180 563 a=4.4880 690 a=3.7180 699 a=5.4230 672 a=4.0040 (consectetur) +Mx 238.0519 +T 522 557 597 669 597 679 551 597 632 583 w=44.7040 (adipiscing) +Mx 39.2060 +My 306.1514 +T 563 620 597 690 w=14.0470 (elit) +Mx 53.2530 +T 2366 w=2.1670 (.) +Mx 59.4883 +Mx 5.4010 +Mx 4.4220 +Mx 5.6320 +T 152 a=5.4010 563 a=4.4880 557 a=5.6320 (Sed) +Mx 79.0115 +T 632 642 632 w=16.6430 (non) +Mx 99.7228 +T 672 597 679 699 679 w=19.8660 (risus) +Mx 119.5888 +T 2366 w=2.1670 (.) +Mx 125.8241 +Mx 5.4010 +Mx 5.4230 +Mx 3.7180 +Mx 5.6210 +Mx 4.4880 +Mx 5.6870 +Mx 5.6320 +Mx 3.0030 +Mx 3.6520 +Mx 3.7180 +Mx 4.4880 +T 152 a=5.4010 699 a=5.4230 679 a=3.7180 669 a=5.6210 563 a=4.4880 632 a=5.6870 557 a=5.6320 597 a=3.0030 679 a=3.7180 679 a=3.7180 563 a=4.4880 (Suspendisse) +Mx 180.7234 +Mx 2.8380 +Mx 4.4220 +Mx 4.5210 +Mx 3.7180 +Mx 5.4230 +Mx 3.7180 +T 620 a=2.8380 563 a=4.4880 551 a=4.5210 690 a=3.7180 699 a=5.4230 679 a=3.7180 (lectus) +Mx 209.4316 +Mx 3.7180 +Mx 5.2690 +Mx 4.0040 +Mx 3.7180 +Mx 5.2690 +Mx 3.6190 +T 690 a=3.7180 642 a=5.2690 672 a=4.0040 690 a=3.7180 642 a=5.2690 672 a=4.0040 (tortor) +T 2367 w=2.4420 (,) +Mx 241.5389 +Mx 5.6320 +Mx 3.0030 +Mx 5.1260 +Mx 5.6870 +Mx 3.0030 +Mx 3.6520 +Mx 3.7180 +Mx 3.0030 +Mx 8.3930 +T 557 a=5.6320 597 a=3.0030 583 a=5.1260 632 a=5.6870 597 a=3.0030 679 a=3.7180 679 a=3.7180 597 a=3.0030 629 a=8.3930 (dignissim) +Mx 14.8819 +My 319.3514 +T 679 597 690 w=10.4390 (sit) +Mx 28.7036 +T 522 629 563 690 w=21.9890 (amet) +Mx 50.6926 +T 2367 w=2.4420 (,) +Mx 56.5174 +T 522 557 597 669 597 679 551 597 632 583 w=44.7040 (adipiscing) +Mx 104.6041 +Mx 5.6870 +Mx 4.4220 +Mx 4.5210 +T 632 a=5.6870 563 a=4.4880 551 a=4.5210 (nec) +T 2367 w=2.4420 (,) +Mx 125.0589 +T 699 620 690 672 597 551 597 563 679 w=34.7160 (ultricies) +Mx 163.1577 +Mx 3.7180 +Mx 4.4220 +Mx 5.6320 +T 679 a=3.7180 563 a=4.4880 557 a=5.6320 (sed) +T 2367 w=2.4420 (,) +Mx 182.7544 +Mx 5.6320 +Mx 5.2690 +Mx 2.8380 +Mx 5.2690 +Mx 3.6190 +T 557 a=5.6320 642 a=5.2690 620 a=2.8380 642 a=5.2690 672 a=4.0040 (dolor) +T 2366 w=2.1670 (.) +Mx 210.9312 +Mx 7.5460 +Mx 3.8720 +Mx 5.3900 +Mx 3.7180 +T 30 a=7.5460 672 a=4.0040 522 a=5.3900 679 a=3.7180 (Cras) +Mx 234.8399 +T 563 620 563 629 563 632 690 699 629 w=47.9160 (elementum) +Mx 14.8819 +My 332.5514 +Mx 5.4230 +Mx 2.8380 +Mx 3.7180 +Mx 4.0040 +Mx 3.0030 +Mx 4.4550 +Mx 4.4880 +Mx 3.7180 +T 699 a=5.4230 620 a=2.8380 690 a=3.7180 672 a=4.0040 597 a=3.0030 551 a=4.5210 563 a=4.4880 679 a=3.7180 (ultrices) +Mx 49.6445 +T 557 597 522 629 w=22.4180 (diam) +Mx 72.0625 +T 2366 w=2.1670 (.) +End page +Finish diff --git a/tests/dropcaps-descenders.sil b/tests/dropcaps-descenders.sil new file mode 100644 index 000000000..cecf0d5e2 --- /dev/null +++ b/tests/dropcaps-descenders.sil @@ -0,0 +1,31 @@ +\begin[papersize=a6]{document} +\nofolios +\neverindent +\script[src=packages/dropcaps] +\set[parameter=document.baselineskip, value=1.2em] +\font[family=Cormorant Infant, size=11pt] +% Normal I +\dropcap[lines=3]{I}bis lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. + +% J has a depth is Cormorant Infant. +% Depth used in scaling in strict mode (default) +\dropcap[lines=3]{J}anua lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. + +% Depth allowed to trigger extra hanged line in non-strict mode +\dropcap[lines=3, strict=false]{J}anua lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi. + +% Normal O +\dropcap[lines=2, strict=false]{O}dos lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. + +% Q has a depth is Cormorant Infant. +% Depth used in scaling in strict mode (default) +\dropcap[lines=2]{Q}uo lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. + +% J has a depth is Cormorant Infant. +% Depth allowed to trigger extra hanged line in non-strict mode... +% ... but allow an (exagerated) baseline ratio tolerance. +\set[parameter=dropcaps.bsratio, value=0.5]{% +\dropcap[lines=2, strict=false]{Q}uo lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. +\par} + +\end{document}