Minor optimization of references -- now spaces will not be referenced.

This commit is contained in:
be5invis 2024-02-19 17:59:01 -08:00
parent 6459be6f68
commit 2a9be6e815
6 changed files with 56 additions and 49 deletions

View file

@ -217,7 +217,12 @@ export class ReferenceGeometry extends GeometryBase {
return this.unwrap().asContours();
}
asReferences() {
return [{ glyph: this.m_glyph, x: this.m_x, y: this.m_y }];
if (this.m_glyph.geometry.measureComplexity() & CPLX_NON_EMPTY) {
return [{ glyph: this.m_glyph, x: this.m_x, y: this.m_y }];
} else {
// A reference to a space is meaningless, thus return nothing
return [];
}
}
getDependencies() {
return [this.m_glyph];