@weasel-js/font 1.9.3 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -24,14 +24,24 @@ An unregistered family renders in the default family with a one-time warning:
24
24
  ```ts
25
25
  setFontFallbackPolicy('substitute'); // default — render in the default family
26
26
  setFontFallbackPolicy('canvas'); // rasterize the real typeface at runtime
27
- setFontFallbackPolicy('none'); // hard miss: render nothing (pre-0.7 behavior)
27
+ setFontFallbackPolicy('none'); // hard miss: render nothing
28
28
 
29
29
  setDefaultFontFamily('Inter'); // defaults to the first registered family
30
30
  ```
31
31
 
32
32
  Substitution changes advance widths, so measurement and wrap differ from the
33
- requested font. `ResolveResult.substituted` reports it structurally so a UI can
34
- surface the swap rather than leaving it to the console.
33
+ requested font. `ResolveResult.substituted` reports it so a UI can
34
+ surface the swap.
35
+
36
+ ## Emoji
37
+
38
+ An emoji is drawn by the platform, whatever face its run is set in: the whole
39
+ grapheme cluster (`👍🏽`, `🇨🇦`, a joined family) is rasterized once through a 2D
40
+ canvas and kept, in its own colors, on RGBA pages of the dynamic atlas beside
41
+ the distance-field ones. It paints untinted and takes only the opacity of the
42
+ text's fill. Under `setFontFallbackPolicy('none')` only a run already on the
43
+ canvas tier gets one; anywhere without a canvas or a color emoji font, a
44
+ cluster is laid out one code point at a time in the fill color.
35
45
 
36
46
  ## Generating an atlas
37
47