Skip to content

Commit b61d7c0

Browse files
committed
Clarify web hyphens TODOs; split render-wiring from custom-string
The CanvasKit/Skwasm TODOs conflated two separate features. Reword to state the actual gap: Hyphens.manual/hidden are accepted+stored but not honored on web until a renderSoftHyphens setter is exposed on the web ParagraphStyle binding (tracked by flutter#18443). Customizing the hyphen string is separate future work, now tracked in flutter#189617 (Skia CL 1205922) instead of flutter#18443.
1 parent 762a4a8 commit b61d7c0

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

‎engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/text.dart‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,13 @@ class CkParagraphStyle implements ui.ParagraphStyle {
7878
final ui.StrutStyle? _strutStyle;
7979
final String? _ellipsis;
8080
final ui.Locale? _locale;
81-
// TODO(dbebawy): honor hyphens once the configurable-soft-hyphen-string Skia
82-
// change (https://skia-review.googlesource.com/c/skia/+/1205922) lands and its
83-
// binding is exposed on SkParagraphStyleProperties. Accepted and stored for now.
81+
// TODO(dbebawy): hyphens is accepted and stored but not honored here yet.
82+
// Neither Hyphens.manual nor Hyphens.hidden takes effect on CanvasKit until a
83+
// renderSoftHyphens setter is exposed on the CanvasKit ParagraphStyle binding
84+
// (the native engine wires this via SkParagraph::setRenderSoftHyphens).
8485
// https://github.com/flutter/flutter/issues/18443
86+
// Customizing the hyphen string is separate future work:
87+
// https://github.com/flutter/flutter/issues/189617
8588
final ui.Hyphens? _hyphens;
8689

8790
static SkTextStyleProperties toSkTextStyleProperties(

‎engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/paragraph.dart‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -837,10 +837,13 @@ class SkwasmParagraphStyle implements ui.ParagraphStyle {
837837
final ui.StrutStyle? _strutStyle;
838838
final String? _ellipsis;
839839
final ui.Locale? _locale;
840-
// TODO(dbebawy): honor hyphens once the configurable-soft-hyphen-string Skia
841-
// change (https://skia-review.googlesource.com/c/skia/+/1205922) lands and a
842-
// skwasm binding is exposed. Accepted and stored for now.
840+
// TODO(dbebawy): hyphens is accepted and stored but not honored here yet.
841+
// Neither Hyphens.manual nor Hyphens.hidden takes effect on Skwasm until a
842+
// renderSoftHyphens setter is exposed on the Skwasm ParagraphStyle binding
843+
// (the native engine wires this via SkParagraph::setRenderSoftHyphens).
843844
// https://github.com/flutter/flutter/issues/18443
845+
// Customizing the hyphen string is separate future work:
846+
// https://github.com/flutter/flutter/issues/189617
844847
final ui.Hyphens? _hyphens;
845848

846849
@override

0 commit comments

Comments
 (0)