Fix a problem with combining character when they are used as accents (e.g., \vec)
This commit is contained in:
parent
4f14fbb301
commit
5394ea5b68
File diff suppressed because one or more lines are too long
|
@ -1166,8 +1166,13 @@
|
||||||
var values = this.getValues("largeop","displaystyle");
|
var values = this.getValues("largeop","displaystyle");
|
||||||
if (values.largeop)
|
if (values.largeop)
|
||||||
{variant = SVG.FONTDATA.VARIANT[values.displaystyle ? "-largeOp" : "-smallOp"]}
|
{variant = SVG.FONTDATA.VARIANT[values.displaystyle ? "-largeOp" : "-smallOp"]}
|
||||||
for (var i = 0, m = this.data.length; i < m; i++)
|
for (var i = 0, m = this.data.length; i < m; i++) {
|
||||||
{if (this.data[i]) {svg.Add(this.data[i].toSVG(variant,scale),svg.w,0,true)}}
|
if (this.data[i]) {
|
||||||
|
var text = this.data[i].toSVG(variant,scale), x = svg.w;
|
||||||
|
if (x === 0 && -text.l > 10*text.w) {x += -text.l} // initial combining character doesn't combine
|
||||||
|
svg.Add(text,x,0,true);
|
||||||
|
}
|
||||||
|
}
|
||||||
svg.Clean();
|
svg.Clean();
|
||||||
if (this.data.join("").length !== 1) {delete svg.skew}
|
if (this.data.join("").length !== 1) {delete svg.skew}
|
||||||
if (values.largeop) {
|
if (values.largeop) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user