pa_font 0.2.3 → 0.2.5

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/paFont.d.ts CHANGED
@@ -87,6 +87,12 @@ export interface Region {
87
87
  bbox: Rect;
88
88
  }
89
89
 
90
+ export interface RegionView {
91
+ readonly outer: readonly Point2D[];
92
+ readonly holes: readonly (readonly Point2D[])[];
93
+ readonly bbox: Rect;
94
+ }
95
+
90
96
  export interface PointSample {
91
97
  x: number;
92
98
  y: number;
@@ -157,6 +163,7 @@ export class PAShape implements Iterable<Region> {
157
163
  glyphs(): PAShape[];
158
164
  toShape(options?: ShapeOptions): PAShape;
159
165
  toRegions(options?: ShapeOptions): Region[];
166
+ toRegionViews(options?: ShapeOptions): RegionView[];
160
167
  openHoles(width: number): PAShape;
161
168
  resample(step: number): PAShape;
162
169
  hit(x: number, y: number, epsilon?: number): HitResult;
@@ -176,6 +183,7 @@ export class paParagraph {
176
183
  drawText(ctx: CanvasRenderingContext2D, options?: DrawTextOptions): void;
177
184
  toShape(options?: ParagraphShapeOptions): PAShape;
178
185
  toRegions(options?: ParagraphShapeOptions): Region[];
186
+ toRegionViews(options?: ParagraphShapeOptions): RegionView[];
179
187
  toPoints(options?: ParagraphPointOptions): PointSample[];
180
188
  }
181
189
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pa_font",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "Generate polygon and point geometry from OpenType fonts.",
5
5
  "keywords": [
6
6
  "font",