Fix Text SVG

This commit is contained in:
Paulo Gustavo Veiga 2021-12-04 16:42:00 -08:00
parent 17b22ca211
commit e07c13631c
5 changed files with 5 additions and 5 deletions

View File

@ -20,7 +20,7 @@ import Font from './Font';
class ArialFont extends Font { class ArialFont extends Font {
constructor() { constructor() {
super(); super();
this._fontFamily = 'arial'; this._fontFamily = 'Arial';
} }
getFontFamily() { getFontFamily() {

View File

@ -20,7 +20,7 @@ import Font from './Font';
class TahomaFont extends Font { class TahomaFont extends Font {
constructor() { constructor() {
super(); super();
this._fontFamily = 'tahoma'; this._fontFamily = 'Tahoma';
} }
getFontFamily() { getFontFamily() {

View File

@ -52,7 +52,7 @@ class TextPeer extends ElementPeer {
const me = this; const me = this;
// FIXME: we could use underscorejs here // FIXME: we could use underscorejs here
lines.forEach((line) => { lines.forEach((line) => {
const tspan = window.document.createElementNS(me.svgNamespace, 'tspan'); const tspan = window.document.createElementNS(ElementPeer.svgNamespace, 'tspan');
tspan.setAttribute('dy', '1em'); tspan.setAttribute('dy', '1em');
tspan.setAttribute('x', me.getPosition().x); tspan.setAttribute('x', me.getPosition().x);

View File

@ -20,7 +20,7 @@ import Font from './Font';
class TimesFont extends Font { class TimesFont extends Font {
constructor() { constructor() {
super(); super();
this._fontFamily = 'times'; this._fontFamily = 'Times';
} }
getFontFamily() { getFontFamily() {

View File

@ -20,7 +20,7 @@ import Font from './Font';
class VerdanaFont extends Font { class VerdanaFont extends Font {
constructor() { constructor() {
super(); super();
this._fontFamily = 'verdana'; this._fontFamily = 'Verdana';
} }
getFontFamily() { getFontFamily() {