Re: [Rdkit-discuss] SVG depiction with fonts?

2021-10-04 Thread Greg Landrum
It would have helped if I'd gotten the sense of the arguments correct...
sorry about that.

What I should have typed is:
d = Draw.MolDraw2DSVG(350,300,-1,-1,True)
The "True" argument disables FreeType

-greg

On Mon, Oct 4, 2021 at 4:38 PM Geoffrey Hutchison 
wrote:

> > Unfortunately there are not keyword arguments for this (something for me
> to fix ASAP), but you can do this as follows:
> > d = Draw.MolDraw2DSVG(350,300,-1,-1,False)
>
> Perfect, thanks! Maybe the keyword can be `useFreeType = False` or
> something along those lines.
>
> -Geoff
>
>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] SVG depiction with fonts?

2021-10-04 Thread Geoffrey Hutchison
> Unfortunately there are not keyword arguments for this (something for me to 
> fix ASAP), but you can do this as follows:
> d = Draw.MolDraw2DSVG(350,300,-1,-1,False)

Perfect, thanks! Maybe the keyword can be `useFreeType = False` or something 
along those lines.

-Geoff



___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] SVG depiction with fonts?

2021-09-30 Thread Greg Landrum
Hi Geoff,

you need to disable the use of freetype when you create the MolDraw2DSVG
object.
Unfortunately there are not keyword arguments for this (something for me to
fix ASAP), but you can do this as follows:
d = Draw.MolDraw2DSVG(350,300,-1,-1,False)

That last "False" turns off FreeType and uses normal SVG text.

I hope this helps,
-greg


On Tue, Sep 28, 2021 at 7:10 PM Geoffrey Hutchison <
geoff.hutchi...@gmail.com> wrote:

> Hi all,
>
> I recently upgraded to RDKit 2021.3 from the March 2020 version. With last
> year's release, I was able to tweak the generated SVG depictions to replace
> characters (e.g., where we used "*" in a SMILES but really wanted "M" for a
> metal center) or change the font-weight and font-size.
>
> svg.replace("font-weight:normal", "font-weight:bold")
>
> Now it seems as if the characters are turned into strokes. Is there an
> option to turn this off and go back to SVG characters with font-weight
> attributes?
>
> Thanks,
> -Geoff
>
> ---
> Prof. Geoffrey Hutchison
> Department of Chemistry
> University of Pittsburgh
> tel: (412) 648-0492
> email: geo...@pitt.edu
> twitter: @ghutchis
> web: https://hutchison.chem.pitt.edu/
>
>
>
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss