Hi @dale,
in order to draw a TextEntity
i would like to use a font which is likely not installed on the users system but included with my plugin installation. The TextEntity
is never added to the doc, instead the text is exploded into curves (because it is a single stroke font and RH6 does not allow to use it otherwise).
If i try below code to query if a font is installed:
import scriptcontext
def DoSomething():
index = scriptcontext.doc.Fonts.FindOrCreate("Arial", False, False)
font = scriptcontext.doc.Fonts[index]
print font.EnglishFamilyName
DoSomething()
Rhino 6 returns an index > 0 so i asume the font “Arial” is installed. However, if i replace “Arial” eg. with “Nonsense”, it still gives me an index > 0 , and it reports EnglishFamilyName = "Nonsense"
. Is this intended behavior ? (“Nonsense” is not a valid font name nor has it been installed).
Preferrably, i would like to add a font to my fonttable without having the user to install the font. Is it possible to create a text entity using the font i have the file path to ?
_
c.