Found while porting the selection magnifier to TypeScript.
PdfViewerSelectionMagnifierParams.magnifierSizeThreshold is documented as:
If the character size (in pt.) is smaller than this value, the magnifier will be shown.
but the default implementation compares the character extent multiplied by the current zoom, i.e. the on-screen (logical pixel) size, not pt:
// pdf_viewer.dart, _shouldShowMagnifierForAnchor
final h = textAnchor.direction == PdfTextDirection.vrtl ? textAnchor.rect.size.width : textAnchor.rect.size.height;
return h * _currentZoom < params.magnifierSizeThreshold;
The behavior looks intentional (a character that is already huge on screen does not need magnification regardless of its pt size), so this is likely just a doc fix: the comment on magnifierSizeThreshold should say the threshold applies to the zoomed on-screen size.
Found while porting the selection magnifier to TypeScript.
PdfViewerSelectionMagnifierParams.magnifierSizeThresholdis documented as:but the default implementation compares the character extent multiplied by the current zoom, i.e. the on-screen (logical pixel) size, not pt:
The behavior looks intentional (a character that is already huge on screen does not need magnification regardless of its pt size), so this is likely just a doc fix: the comment on
magnifierSizeThresholdshould say the threshold applies to the zoomed on-screen size.