Skip to content

Commit cf9a099

Browse files
committed
Merge branch 'dev'
2 parents 5f747e2 + 6df5307 commit cf9a099

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/madl_etrck.mad

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,9 @@ local function get_algn (elm, m)
523523
end
524524

525525
local function get_frng (elm, m, f)
526-
if not (m.cmap and elm.is_thick) then return true end -- avoid to retrieve all
526+
if not (m.cmap and elm.is_thick) or f == fnil then
527+
return f ~= fnil
528+
end
527529

528530
local frng, fmax, fken, fkex, e1, e2, h1, h2, fint, fintx, hgap, f1, f2 =
529531
0, 0,false,false, 0, 0, 0, 0, 0, 0, 0, 0, 0
@@ -565,11 +567,19 @@ end
565567

566568
-- helpers --------------------------------------------------------------------o
567569

570+
-- debug/optimisation counters
571+
local n_ctilt = 0
572+
local n_cmisalign = 0
573+
local n_cfringe = 0
574+
568575
local function ctilt (elm, m, dir)
569576
if not m.cmap then
570577
return tilt(elm, m, dir)
571578
end
572579

580+
--n_ctilt = n_ctilt+1
581+
--io.write("ctilt: ", n_ctilt, "\n")
582+
573583
if dir == m.sdir then -- copy only once
574584
local c = xflw(m)
575585
c.tlt = xcpy(c.tlt, m.tlt)
@@ -578,11 +588,15 @@ local function ctilt (elm, m, dir)
578588
maps[m.cmap][tilt](xflw_(m), dir)
579589
end
580590

591+
581592
local function cmisalign (elm, m, dir)
582593
if not m.cmap then
583594
return misalign(elm, m, dir)
584595
end
585596

597+
--n_cmisalign = n_cmisalign+1
598+
--io.write("cmisalign: ", n_cmisalign, "\n")
599+
586600
if dir == m.sdir then -- copy only once
587601
local a = m.algn
588602
local c = xflw(m)
@@ -604,6 +618,9 @@ local function cfringe (elm, m, dir, frng)
604618
return frng(elm, m, dir)
605619
end
606620

621+
--n_cfringe = n_cfringe+1
622+
--io.write("cfringe: ", n_cfringe, "\n")
623+
607624
local f = m.frng
608625
local c = xflw(m)
609626
local a = m.pdir == dir and f.e2 - f.e1 or 0

0 commit comments

Comments
 (0)