jassub 1.1.1 → 1.1.4

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
@@ -100,8 +100,9 @@ The default options are best, and automatically fallback to the next fastest opt
100
100
  - `{String} [options.subUrl=options.subContent]` The URL of the subtitle file to play.
101
101
  - `{String} [options.subContent=options.subUrl]` The content of the subtitle file to play.
102
102
  - `{String[]|Uint8Array[]} options.fonts` { Optional } An array of links or Uint8Arrays to the fonts used in the subtitle. If Uint8Array is used the array is copied, not referenced. This forces all the fonts in this array to be loaded by the renderer, regardless of if they are used.
103
- - `{Object} options.availableFonts` { Optional } Object with all available fonts - Key is font name in lower case, value is link: { arial: '/font1.ttf' }. These fonts are selectively loaded if detected as used in the current subtitle track.
104
- - `{String} options.fallbackFont` { Optional = 'default.woff2' } The URL of the fallback font to use. This font is used if the other font for the style is missing special glyphs or unicode.
103
+ - `{Object} options.availableFonts` { Optional = {'liberation sans': './default.woff2'}} Object with all available fonts - Key is font family in lower case, value is link or Uint8Array: { arial: '/font1.ttf' }. These fonts are selectively loaded if detected as used in the current subtitle track.
104
+ - `{String} options.fallbackFont` { Optional = 'liberation sans' } The font family key of the fallback font in availableFonts to use if the other font for the style is missing special glyphs or unicode.
105
+ - `{Boolean} options.useLocalFonts` { Optional = false } If the Local Font Access API is enabled [chrome://flags/#font-access], the library will query for permissions to use local fonts and use them if any are missing. The permission can be queried beforehand using navigator.permissions.request({ name: 'local-fonts' }).
105
106
  - `{Number} options.libassMemoryLimit` { Optional } libass bitmap cache memory limit in MiB (approximate).
106
107
  - `{Number} options.libassGlyphLimit` { Optional } libass glyph cache memory limit in MiB (approximate).
107
108
 
@@ -160,6 +161,8 @@ This library has a lot of methods and properties, however many aren't made for m
160
161
  - {Number} index
161
162
  - `getStyles (callback)` - Get all ASS styles.
162
163
  - {function(Error|null, ASS_Style)} callback Function to callback when worker returns the styles.
164
+ - `addfont (font)` - Adds a font to the renderer.
165
+ - {String|Uint8Array} font Font to add.
163
166
 
164
167
  ### ASS_Event object properties
165
168
  - `{Number} Start` - Start Time of the Event, in 0:00:00:00 format ie. Hrs:Mins:Secs:hundredths. This is the time elapsed during script playback at which the text will appear onscreen. Note that there is a single digit for the hours!