I'm using QCAD Professional 3.18.1, both on Ubuntu 18.04 and Debian Jessie inside a Docker container. The problem that I have occurs in both environments.
I'm trying to add a text entity to a .dxf with a script called from the command line. I use additional true-type fonts, but they are always replaced with the standard font. According to the QCAD gui the fonts are available, but when I list the fonts with
Code: Select all
RFontList.init();
print (RFontList.getNames());
they do not show up. The code used to create the Entity:
Code: Select all
function addText(doc, text, size, font, offsetx, offsety, bold, italic, hAlign) {
if (isNull(font)) font = "Standard";
if (isNull(hAlign)) hAlign = CONSTANTS[align];
if (isNull(bold)) bold = false;
if (isNull(italic)) italic = false;
var height = parseInt(size);
var angle = 0.0;
var vAlign = RS.VAlignTop;
var position = new RVector(offsetx, offsety);
var entity = new RTextEntity(
doc,
new RTextData(
position,
position,
height,
100.0,
vAlign,
hAlign,
RS.LeftToRight,
RS.Exact,
1.0,
'\\H' + size + ';' + text,
'Sansation',
bold,
italic,
deg2rad(angle),
false
)
);
var di = new RDocumentInterface(doc);
di.applyOperation(new RAddObjectOperation(entity, false));
}
Thanks,
Ewald