Skip to content

Commit 92119c8

Browse files
author
Jordan Bieder
committed
Resize font when scaling changes
1 parent e394acb commit 92119c8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/window/winglfw3.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,12 @@ WinGlfw3::WinGlfw3(pCanvas &canvas, const int width, const int height, const int
118118
glfwPtr_[win]->_optioni["fontSize"] *= average/(( scalings_[win][0]+scalings_[win][1])/2.);
119119
scalings_[win][0]=xscale;
120120
scalings_[win][1]=yscale;
121+
glfwPtr[win]->_render._render.setSize(glfwPtr_[win]->_optioni["fontSize"]);
121122
});
122123
std::clog << "Scaling is " << scalings_[_win][0]<< " x "<< scalings_[_win][1]<< std::endl;
123124
_optioni["fontSize"] *= ( scalings_[_win][0]+scalings_[_win][1])/2.;
124-
#endif
125125
_render._render.setSize(_optioni["fontSize"]);
126+
#endif
126127

127128
#else
128129
throw EXCEPTION("GLFW support is not available.\nConsider compiling the code with OpenGL+GLFW",ERRDIV);

0 commit comments

Comments
 (0)