Skip to content

Commit

Permalink
Fix #1873 Wrong Font Family and Size on Print plugin (#1874)
Browse files Browse the repository at this point in the history
* Fixed font family and size on print

* Fixed font name in legend options
  • Loading branch information
allyoucanmap authored and Tobia Di Pisa committed May 24, 2017
1 parent 7343a59 commit f116947
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions web/client/components/print/Font.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const Font = React.createClass({
onChangeFamily(family) {
this.props.onChangeFamily(family);
},
onChangeSize(size) {
this.props.onChangeSize(size);
onChangeSize(e) {
this.props.onChangeSize(parseFloat(e.target.value));
},
render() {
return (
Expand Down
3 changes: 1 addition & 2 deletions web/client/utils/PrintUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,7 @@ const PrintUtils = {
height: spec.iconSize,
width: spec.iconSize,
minSymbolSize: spec.iconSize,
fontFamily: spec.fontFamily,
LEGEND_OPTIONS: "forceLabels:" + (spec.forceLabels ? "on" : "") + ";fontAntialiasing:" + spec.antiAliasing + ";dpi:" + spec.legendDpi + ";fontStyle:" + (spec.bold && "bold" || (spec.italic && "italic") || ''),
LEGEND_OPTIONS: "forceLabels:" + (spec.forceLabels ? "on" : "") + ";fontAntialiasing:" + spec.antiAliasing + ";dpi:" + spec.legendDpi + ";fontStyle:" + (spec.bold && "bold" || (spec.italic && "italic") || '') + ";fontName:" + spec.fontFamily + ";fontSize:" + spec.fontSize,
format: "image/png",
...assign({}, layer.params)
}
Expand Down

0 comments on commit f116947

Please sign in to comment.