continue;
}
+
+
$linksToAdd = [$link];
if ($link->overlapDoublePage() && !$this->isOnePage()) {
$linksToAdd[] = $link->getRightClone();
}
+
foreach ($linksToAdd as $lta) {
try {
/** @var $lta Link */
{
return $this->getFluidbook()->getPDFSplitSource($page);
}
+
+ public function getWidthForLinks() {
+ return $this->getWidth() / $this->getLinkScale();
+ }
+
+ public function getHeightForLinks() {
+ return $this->getHeight() / $this->getLinkScale();
+ }
}
--- /dev/null
+#!/usr/bin/fontforge -script
+Open($1)
+Print("Open font ",$1)
+Print("Em size : ",$em);
+i=2
+while ( i<=$argc-3 )
+ Print ("Merge with font ",$argv[i])
+ MergeFonts($argv[i])
+ ++i
+endloop
+
+if($argv[i]!="-")
+ if($iscid==1)
+ Print("It's a CID Font")
+ Print("Flatten CID")
+ CIDFlatten()
+ endif
+
+ Print("Rewrite font with CMAP ",$argv[i]);
+ cmap=LoadStringFromFile($argv[i])
+ glyphs=StrSplit(cmap,"\\n");
+ j=0
+ while(j<SizeOf(glyphs))
+ if(glyphs[j]!="")
+ SelectNone()
+ glyph=StrSplit(glyphs[j]," ")
+ ufrom=Strtol(glyph[0],16)
+ uto=Strtol(glyph[1],16)
+ Select(ufrom)
+ SetUnicodeValue(UCodePoint(uto))
+ Print("Move ",glyph[0]," to ",glyph[1])
+ j++
+ endif
+ endloop
+
+ if(j==0)
+ Print("Empty cmap")
+ Print("Map non-display values to private area")
+
+ k=1
+
+ Reencode("unicode",1);
+
+ while(k<=32)
+ SelectNone()
+ Select(k)
+ CopyReference()
+ Select(k+57344)
+ Paste()
+ k++
+ endloop
+ endif
+endif
+i++
+Print("Write font ",$argv[i])
+Generate($argv[i])
--- /dev/null
+#!/usr/bin/fontforge -script
+Open($1)
+Print("Open font ",$1)
+
+
+if($2!="-")
+ // Italic
+ Print("Set italic angle from ",$italicangle," to ",$2)
+ SetItalicAngle(Strtol($2))
+endif
+
+if($5!="-" && $6!="-")
+ // Select first char
+ c=Strtol($5)
+ Select(c)
+ w=Real(GlyphInfo("Width"))
+ if(c==0 && Round(w)==1000)
+ Print("Maybe an error, no scaling will occur")
+ else
+ rw=Real(Strtol($6))
+ Print("First char width is ",w," and should be ",rw)
+ if(w!=rw)
+ ratio=(rw/w)*100.0
+ Print("Scaling the whole font to ",ratio,"%")
+ SelectAll()
+ Transform(Round(ratio),0,0,Round(ratio),0,0)
+ endif
+ endif
+endif
+
+
+if($3!="-" && $4!="-" && $3!="0")
+ Print("Set Ascent & Descent to ",$3," and ",$4)
+ // Ascent & Descent
+ ScaleToEm(Strtol($3),Strtol($4));
+ SetOS2Value("TypoAscent",Strtol($3));
+ SetOS2Value("TypoAscentIsOffset",0);
+ SetOS2Value("WinAscent",Strtol($3));
+ SetOS2Value("WinAscentIsOffset",0);
+ SetOS2Value("TypoDescent",Strtol($4));
+ SetOS2Value("TypoDescentIsOffset",0);
+ SetOS2Value("WinDescent",Strtol($4));
+ SetOS2Value("WinDescentIsOffset",0);
+endif
+
+SetMacStyle(-1);
+SetGasp(65535,3)
+
+Generate($1)