Skip to content

Commit

Permalink
Merge pull request #2012 from Artoria2e5/patch-1
Browse files Browse the repository at this point in the history
Do not stoke around the (svg) text
  • Loading branch information
ghutchis committed Aug 28, 2019
2 parents 6ba014e + 5087203 commit 9c36d87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/depict/svgpainter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ namespace OpenBabel
void SVGPainter::DrawText(double x, double y, const std::string &text)
{
m_ofs << "<text x=\"" << x << "\" y=\"" << y << "\""
<< " fill=" << MakeRGB(m_Pencolor) << " stroke=" << MakeRGB(m_Pencolor) << "stroke-width=\"1\" "
<< " fill=" << MakeRGB(m_Pencolor) << "stroke-width='0' font-weight='bold' "
<< "font-size=\"" << m_fontPointSize << "\" >"
<< text << "</text>\n";
}
Expand All @@ -163,7 +163,7 @@ namespace OpenBabel
metrics.ascent = m_fontPointSize;
metrics.descent = m_fontPointSize * -0.23; // Offset from baseline of bottom of text
metrics.height = m_fontPointSize * 1.26; // Distance between successive lines of text
metrics.width = 0.0;
metrics.width = 0.0;
for(string::size_type i=0;i<text.size();++i)
metrics.width += m_fontPointSize * (isalpha(text[i]) ? 0.75 : 0.5);

Expand Down

0 comments on commit 9c36d87

Please sign in to comment.