Setting font on png exportToBinFormat

User 956e0ca334

14-10-2013 16:35:04

Hi there,


I am having a problem setting the "atomFont" for pngs.  I need to save it using the exportToBinFormat with Times new Roman


formatString="pdf:scale30,atsiz0.4000000000000001,atomFont:TimesNewRoman.plain,bondw0.18,wireThickness0.062,stickThickness0.07,ballRadius0.5,H_heteroterm,anybond_auto,cv_inChain,#ffffff,valenceErrorVisible,ligandOrderVisibility_withDef,cpk,aprop,downwedge_mdl,coordBondStyle_arrow,coordBondStyleAtMulticenter_hashed,wireframe"


 byte[] moldata = MolExporter.exportToBinFormat(doc, formatString);


I have tried:


 TimesNewRoman.plain


 Times New Roman.plain


 


but neither of them seem to work, it always produced a png with sans serif, but is fine when I export a molecule from the marvin itself.


Can you tell me how to set this please?


Thanks


Megan

ChemAxon 5433b8e56b

15-10-2013 07:24:56

Hi Megan,


the required format for you is the following: atomFont:Times New Roman-PLAIN-12


Where the font family is separated by a hyphen from font style which should be capitalized, it should be followed with an other hyphen, and the font size.


This parameter is not documented, because we feel it a bit problematic and unstable in this way, and we could not have the time either to figure out a better solution or test it thoroughly yet, so it is a subject to change in the future, but changing it is not included in our short term plans.


Regards,
Istvan 

User 956e0ca334

15-10-2013 08:48:55

thanks very much!