@@ -523,7 +523,9 @@ local function get_algn (elm, m)
523
523
end
524
524
525
525
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
527
529
528
530
local frng, fmax, fken, fkex, e1, e2, h1, h2, fint, fintx, hgap, f1, f2 =
529
531
0, 0,false,false, 0, 0, 0, 0, 0, 0, 0, 0, 0
@@ -565,11 +567,19 @@ end
565
567
566
568
-- helpers --------------------------------------------------------------------o
567
569
570
+ -- debug/optimisation counters
571
+ local n_ctilt = 0
572
+ local n_cmisalign = 0
573
+ local n_cfringe = 0
574
+
568
575
local function ctilt (elm, m, dir)
569
576
if not m.cmap then
570
577
return tilt(elm, m, dir)
571
578
end
572
579
580
+ --n_ctilt = n_ctilt+1
581
+ --io.write("ctilt: ", n_ctilt, "\n")
582
+
573
583
if dir == m.sdir then -- copy only once
574
584
local c = xflw(m)
575
585
c.tlt = xcpy(c.tlt, m.tlt)
@@ -578,11 +588,15 @@ local function ctilt (elm, m, dir)
578
588
maps[m.cmap][tilt](xflw_(m), dir)
579
589
end
580
590
591
+
581
592
local function cmisalign (elm, m, dir)
582
593
if not m.cmap then
583
594
return misalign(elm, m, dir)
584
595
end
585
596
597
+ --n_cmisalign = n_cmisalign+1
598
+ --io.write("cmisalign: ", n_cmisalign, "\n")
599
+
586
600
if dir == m.sdir then -- copy only once
587
601
local a = m.algn
588
602
local c = xflw(m)
@@ -604,6 +618,9 @@ local function cfringe (elm, m, dir, frng)
604
618
return frng(elm, m, dir)
605
619
end
606
620
621
+ --n_cfringe = n_cfringe+1
622
+ --io.write("cfringe: ", n_cfringe, "\n")
623
+
607
624
local f = m.frng
608
625
local c = xflw(m)
609
626
local a = m.pdir == dir and f.e2 - f.e1 or 0
0 commit comments