three-text 0.4.7 → 0.4.8

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/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * three-text v0.4.7
2
+ * three-text v0.4.8
3
3
  * Copyright (C) 2025 Countertype LLC
4
4
  *
5
5
  * This program is free software: you can redistribute it and/or modify
@@ -2005,8 +2005,8 @@ class WoffConverter {
2005
2005
  }
2006
2006
  if (!woff2Decoder) {
2007
2007
  throw new Error('WOFF2 fonts require enabling the decoder. Add to your code:\n' +
2008
- " import { decode } from 'woff2-decode';\n" +
2009
- ' Text.enableWoff2(decode);');
2008
+ " import { woff2Decode } from 'woff2-decode';\n" +
2009
+ ' Text.enableWoff2(woff2Decode);');
2010
2010
  }
2011
2011
  const decoded = await woff2Decoder(woff2Buffer);
2012
2012
  logger.log('WOFF2 font decompressed successfully');
@@ -5603,7 +5603,7 @@ class Text {
5603
5603
  static { this.maxFontCacheMemoryBytes = Infinity; }
5604
5604
  static { this.fontIdCounter = 0; }
5605
5605
  // Enable WOFF2 font support (adds ~45KB to bundle if imported)
5606
- // Usage: import { decode } from 'woff2-decode'; Text.enableWoff2(decode);
5606
+ // Usage: import { woff2Decode } from 'woff2-decode'; Text.enableWoff2(woff2Decode);
5607
5607
  static enableWoff2(decoder) {
5608
5608
  setWoff2Decoder(decoder);
5609
5609
  }
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * three-text v0.4.7
2
+ * three-text v0.4.8
3
3
  * Copyright (C) 2025 Countertype LLC
4
4
  *
5
5
  * This program is free software: you can redistribute it and/or modify
@@ -2002,8 +2002,8 @@ class WoffConverter {
2002
2002
  }
2003
2003
  if (!woff2Decoder) {
2004
2004
  throw new Error('WOFF2 fonts require enabling the decoder. Add to your code:\n' +
2005
- " import { decode } from 'woff2-decode';\n" +
2006
- ' Text.enableWoff2(decode);');
2005
+ " import { woff2Decode } from 'woff2-decode';\n" +
2006
+ ' Text.enableWoff2(woff2Decode);');
2007
2007
  }
2008
2008
  const decoded = await woff2Decoder(woff2Buffer);
2009
2009
  logger.log('WOFF2 font decompressed successfully');
@@ -5600,7 +5600,7 @@ class Text {
5600
5600
  static { this.maxFontCacheMemoryBytes = Infinity; }
5601
5601
  static { this.fontIdCounter = 0; }
5602
5602
  // Enable WOFF2 font support (adds ~45KB to bundle if imported)
5603
- // Usage: import { decode } from 'woff2-decode'; Text.enableWoff2(decode);
5603
+ // Usage: import { woff2Decode } from 'woff2-decode'; Text.enableWoff2(woff2Decode);
5604
5604
  static enableWoff2(decoder) {
5605
5605
  setWoff2Decoder(decoder);
5606
5606
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * three-text v0.4.7
2
+ * three-text v0.4.8
3
3
  * Copyright (C) 2025 Countertype LLC
4
4
  *
5
5
  * This program is free software: you can redistribute it and/or modify
@@ -307,7 +307,7 @@ if(n.byteLength!==t.Be)throw Error(`Decompression failed: expected ${t.Be} bytes
307
307
  return new Uint8Array(n)}))
308
308
  for(let t=0;s>t;t++){const e=l[t],i=12+16*t
309
309
  a.setUint32(i,e.tag),a.setUint32(i+4,e.t),a.setUint32(i+8,c),a.setUint32(i+12,e.Be),o.set(u[t],c),c+=e.Be,c+=(4-e.Be%4)%4}return o.buffer.slice(0,c)}static async Ne(t){if(new DataView(t).getUint32(0)!==C)throw Error("Not a valid WOFF2 font")
310
- if(!V)throw Error("WOFF2 fonts require enabling the decoder. Add to your code:\n import { decode } from 'woff2-decode';\n Text.enableWoff2(decode);")
310
+ if(!V)throw Error("WOFF2 fonts require enabling the decoder. Add to your code:\n import { woff2Decode } from 'woff2-decode';\n Text.enableWoff2(woff2Decode);")
311
311
  return(await V(t)).buffer}static async Ue(t){const e=new ReadableStream({start(e){e.enqueue(t),e.close()}}).pipeThrough(new DecompressionStream("deflate"))
312
312
  return new Response(e).arrayBuffer()}}class Y{constructor(t){this.$e=t}async Pe(t,e){if(!t||12>t.byteLength)throw Error("Invalid font buffer: too small to be a valid font file")
313
313
  const i=q.ke(t)
package/dist/index.min.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * three-text v0.4.7
2
+ * three-text v0.4.8
3
3
  * Copyright (C) 2025 Countertype LLC
4
4
  *
5
5
  * This program is free software: you can redistribute it and/or modify
@@ -306,7 +306,7 @@ if(n.byteLength!==t.Be)throw Error(`Decompression failed: expected ${t.Be} bytes
306
306
  return new Uint8Array(n)}))
307
307
  for(let t=0;s>t;t++){const e=l[t],i=12+16*t
308
308
  a.setUint32(i,e.tag),a.setUint32(i+4,e.t),a.setUint32(i+8,c),a.setUint32(i+12,e.Be),o.set(u[t],c),c+=e.Be,c+=(4-e.Be%4)%4}return o.buffer.slice(0,c)}static async Ue(t){if(new DataView(t).getUint32(0)!==C)throw Error("Not a valid WOFF2 font")
309
- if(!V)throw Error("WOFF2 fonts require enabling the decoder. Add to your code:\n import { decode } from 'woff2-decode';\n Text.enableWoff2(decode);")
309
+ if(!V)throw Error("WOFF2 fonts require enabling the decoder. Add to your code:\n import { woff2Decode } from 'woff2-decode';\n Text.enableWoff2(woff2Decode);")
310
310
  return(await V(t)).buffer}static async Ne(t){const e=new ReadableStream({start(e){e.enqueue(t),e.close()}}).pipeThrough(new DecompressionStream("deflate"))
311
311
  return new Response(e).arrayBuffer()}}class Y{constructor(t){this.$e=t}async Pe(t,e){if(!t||12>t.byteLength)throw Error("Invalid font buffer: too small to be a valid font file")
312
312
  const i=q.ke(t)
package/dist/index.umd.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * three-text v0.4.7
2
+ * three-text v0.4.8
3
3
  * Copyright (C) 2025 Countertype LLC
4
4
  *
5
5
  * This program is free software: you can redistribute it and/or modify
@@ -2007,8 +2007,8 @@
2007
2007
  }
2008
2008
  if (!woff2Decoder) {
2009
2009
  throw new Error('WOFF2 fonts require enabling the decoder. Add to your code:\n' +
2010
- " import { decode } from 'woff2-decode';\n" +
2011
- ' Text.enableWoff2(decode);');
2010
+ " import { woff2Decode } from 'woff2-decode';\n" +
2011
+ ' Text.enableWoff2(woff2Decode);');
2012
2012
  }
2013
2013
  const decoded = await woff2Decoder(woff2Buffer);
2014
2014
  logger.log('WOFF2 font decompressed successfully');
@@ -5607,7 +5607,7 @@
5607
5607
  static { this.maxFontCacheMemoryBytes = Infinity; }
5608
5608
  static { this.fontIdCounter = 0; }
5609
5609
  // Enable WOFF2 font support (adds ~45KB to bundle if imported)
5610
- // Usage: import { decode } from 'woff2-decode'; Text.enableWoff2(decode);
5610
+ // Usage: import { woff2Decode } from 'woff2-decode'; Text.enableWoff2(woff2Decode);
5611
5611
  static enableWoff2(decoder) {
5612
5612
  setWoff2Decoder(decoder);
5613
5613
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * three-text v0.4.7
2
+ * three-text v0.4.8
3
3
  * Copyright (C) 2025 Countertype LLC
4
4
  *
5
5
  * This program is free software: you can redistribute it and/or modify
@@ -308,7 +308,7 @@ if(n.byteLength!==t.Be)throw Error(`Decompression failed: expected ${t.Be} bytes
308
308
  return new Uint8Array(n)}))
309
309
  for(let t=0;s>t;t++){const e=l[t],i=12+16*t
310
310
  a.setUint32(i,e.tag),a.setUint32(i+4,e.t),a.setUint32(i+8,c),a.setUint32(i+12,e.Be),o.set(u[t],c),c+=e.Be,c+=(4-e.Be%4)%4}return o.buffer.slice(0,c)}static async Ue(t){if(new DataView(t).getUint32(0)!==C)throw Error("Not a valid WOFF2 font")
311
- if(!V)throw Error("WOFF2 fonts require enabling the decoder. Add to your code:\n import { decode } from 'woff2-decode';\n Text.enableWoff2(decode);")
311
+ if(!V)throw Error("WOFF2 fonts require enabling the decoder. Add to your code:\n import { woff2Decode } from 'woff2-decode';\n Text.enableWoff2(woff2Decode);")
312
312
  return(await V(t)).buffer}static async Ne(t){const e=new ReadableStream({start(e){e.enqueue(t),e.close()}}).pipeThrough(new DecompressionStream("deflate"))
313
313
  return new Response(e).arrayBuffer()}}class Y{constructor(t){this.$e=t}async Pe(t,e){if(!t||12>t.byteLength)throw Error("Invalid font buffer: too small to be a valid font file")
314
314
  const i=q.ke(t)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "three-text",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "3D mesh font geometry and text layout engine for the web",
5
5
  "main": "dist/three/index.cjs",
6
6
  "module": "dist/three/index.js",
@@ -109,7 +109,7 @@
109
109
  "dependencies": {
110
110
  "harfbuzzjs": "^0.4.15",
111
111
  "libtess": "^1.2.2",
112
- "woff2-decode": "^0.2.0"
112
+ "woff2-decode": "^0.3.0"
113
113
  },
114
114
  "devDependencies": {
115
115
  "@react-three/fiber": ">=8.0.0",