ugcinc 5.5.0 → 5.5.1

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
@@ -745,7 +745,7 @@ daily, so families added to the catalogue become identifiable and renderable
745
745
  without a new release. Image Composer text uses a library font through
746
746
  `fontFamily` (it takes precedence over `font`); `fontWeight` picks the nearest
747
747
  weight the family has. The family list is public at
748
- `https://media.ugc.inc/owned-uploads/render/fonts/google/catalogue.json`
748
+ `https://media.ugc.inc/owned-uploads/render/0c02f309-204e-4ea1-b924-028250cfd029/catalogue.json`
749
749
  (`fetchFontLibraryCatalogue()` in `ugcinc/render`).
750
750
 
751
751
  ```typescript
@@ -20,9 +20,9 @@ export declare function getFontFamily(fontType: FontType, fontFamily?: string):
20
20
  /**
21
21
  * Font library: the Google Fonts catalogue mirrored by UGC (open licences).
22
22
  * `catalogue.json` lists every family with its available upright weights;
23
- * files live at `<base>/files/<slug>/<weight>.ttf` (Latin subset).
23
+ * files live at `<base>/<slug>.<weight>.ttf` (Latin subset).
24
24
  */
25
- export declare const FONT_LIBRARY_BASE_URL = "https://media.ugc.inc/owned-uploads/render/fonts/google";
25
+ export declare const FONT_LIBRARY_BASE_URL = "https://media.ugc.inc/owned-uploads/render/0c02f309-204e-4ea1-b924-028250cfd029";
26
26
  export interface FontLibraryCatalogue {
27
27
  version: number;
28
28
  source: 'google-fonts';
@@ -42,9 +42,9 @@ function getFontFamily(fontType, fontFamily) {
42
42
  /**
43
43
  * Font library: the Google Fonts catalogue mirrored by UGC (open licences).
44
44
  * `catalogue.json` lists every family with its available upright weights;
45
- * files live at `<base>/files/<slug>/<weight>.ttf` (Latin subset).
45
+ * files live at `<base>/<slug>.<weight>.ttf` (Latin subset).
46
46
  */
47
- exports.FONT_LIBRARY_BASE_URL = 'https://media.ugc.inc/owned-uploads/render/fonts/google';
47
+ exports.FONT_LIBRARY_BASE_URL = 'https://media.ugc.inc/owned-uploads/render/0c02f309-204e-4ea1-b924-028250cfd029';
48
48
  /** CSS family name a library font is registered under (namespaced so it never collides with bundled fonts). */
49
49
  function libraryFontFace(family) {
50
50
  return `UGC Library ${family}`;
@@ -98,7 +98,7 @@ async function loadLibraryFonts(requests) {
98
98
  const key = `${family}|${wanted}`;
99
99
  let pending = loadedLibraryFaces.get(key);
100
100
  if (!pending) {
101
- const face = new FontFace(libraryFontFace(family), `url(${exports.FONT_LIBRARY_BASE_URL}/files/${slug}/${fileWeight}.ttf)`, { weight: String(wanted), style: 'normal' });
101
+ const face = new FontFace(libraryFontFace(family), `url(${exports.FONT_LIBRARY_BASE_URL}/${slug}.${fileWeight}.ttf)`, { weight: String(wanted), style: 'normal' });
102
102
  pending = face.load().then((loaded) => {
103
103
  document.fonts.add(loaded);
104
104
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "5.5.0",
3
+ "version": "5.5.1",
4
4
  "description": "TypeScript/JavaScript client for the UGC Inc API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",