executeHandleFontSize function
Implementation
bool executeHandleFontSize(FluentDocument document, double fontSize) {
final root = document.content;
final cursor = document.cursor;
final selection = resolveSelection(
root,
cursor.anchorId,
cursor.anchorOffset,
cursor.focusId,
cursor.focusOffset,
cachedStops: document.caretStops,
cachedLines: document.logicalLines,
);
if (selection != null) {
return _applyFontSizeToSelection(document, selection, fontSize);
}
// Collapsed cursor: store pending size (persistent like Word/Google Docs).
return _applyFontSizeAtCursor(document, fontSize);
}