SVG Refactor - minor cleanups

This commit is contained in:
wandererfan
2019-06-08 11:16:51 -04:00
committed by WandererFan
parent ca5051a798
commit 044fe79549
9 changed files with 100 additions and 101 deletions

View File

@@ -126,13 +126,14 @@ void QGIViewAnnotation::drawAnnotation()
}
const std::vector<std::string>& annoText = viewAnno->Text.getValues();
int fontSize = calculateFontPixelSize(viewAnno->TextSize.getValue());
//build HTML/CSS formatting around Text lines
std::stringstream ss;
ss << "<html>\n<head>\n<style>\n";
ss << "p {";
ss << "font-family:" << viewAnno->Font.getValue() << "; ";
ss << "font-size:" << Rez::guiX(viewAnno->TextSize.getValue()) << "pt; "; //not really pts???
ss << "font-size:" << fontSize << "px; ";
if (viewAnno->TextStyle.isValue("Normal")) {
ss << "font-weight:normal; font-style:normal; ";
} else if (viewAnno->TextStyle.isValue("Bold")) {