Skip to content

Commit

Permalink
Use bold text for svg
Browse files Browse the repository at this point in the history
  • Loading branch information
Artoria2e5 committed Aug 17, 2019
1 parent 23911b0 commit 5087203
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-width=\"0\" "
<< " 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 5087203

Please sign in to comment.