Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/new_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,4 @@ Once a release cycle:

- Check that completions are still working with `fish` and `zsh` when tab is pressed
- Check that F3D is added for extensions on a fresh Windows installation
- Check that the font scale has been auto-scaled correctly when app launched
13 changes: 12 additions & 1 deletion vtkext/private/module/vtkF3DRenderer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1345,7 +1345,18 @@ void vtkF3DRenderer::ConfigureTextActors()
}
}

this->UIActor->SetFontScale(this->FontScale);
vtkWindow* vtkWindow = this->GetVTKWindow();
// Detect and set logical DPI (Currently only work on Windows platform)
vtkWindow->DetectDPI();
// Return logical DPI is scaled by system scale
// Default return value = 72 when DPI was not detected
const int dpi = vtkWindow->GetDPI();
const double baseline = 72;
// Default scale factor to 1
const double scaleFactor = static_cast<double>(dpi) / baseline;
const double adjustedFontScale = this->FontScale * scaleFactor;

this->UIActor->SetFontScale(adjustedFontScale);

this->TextActorsConfigured = true;
}
Expand Down