Skip to content

Commit

Permalink
Scale up CodeInput font size on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
kpeeters committed Feb 14, 2019
1 parent 71029c9 commit a4f9fa6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion frontend/gtkmm/CodeInput.cc
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,11 @@ void CodeInput::slice_cell(std::string& before, std::string& after)
void CodeInput::set_font_size(int num)
{
std::ostringstream fstr;
fstr << "monospace " << 9+(num*2);
float size=9+(num*2);
#ifdef __APPLE__
size*=1.5;
#endif
fstr << "monospace " << size;
edit.override_font(Pango::FontDescription(fstr.str()));
edit.queue_resize();
}
2 changes: 1 addition & 1 deletion frontend/gtkmm/NotebookWindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1730,7 +1730,7 @@ void NotebookWindow::on_prefs_font_size(int num)
engine.set_font_size(12+(num*2));

if(is_configured) {
std::cerr << "cadabra-client: re-running TeX to change font size" << std::endl;
// std::cerr << "cadabra-client: re-running TeX to change font size" << std::endl;
// No point in running TeX on all cells if we have not yet had an
// on_configure_event signal; that will come after us and then we will
// have to run all again.
Expand Down

0 comments on commit a4f9fa6

Please sign in to comment.