Skip to content

Commit

Permalink
Fixup skewing for subtitles. Various docs fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ILOVEPIE committed Dec 14, 2023
1 parent cc3d3e1 commit 9293992
Show file tree
Hide file tree
Showing 4 changed files with 170 additions and 47 deletions.
6 changes: 3 additions & 3 deletions README.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ To view the gallery click [here](/gallery/gallery.md) if you're using a decent b
### Documentation
How to include the library (from the jsdelivr CDN, this cdn is recommended as they publish usage statistics for each package):
```html
<script src="https://cdn.jsdelivr.net/npm/opentype.js@latest/dist/opentype.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/opentype.js@^2.0.0/dist/opentype.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@sabre-js/sabre@latest/dist/sabre.min.js"></script>
```
How to include the library (from the unpkg CDN, for the more privacy minded):
```html
<script src="https://unpkg.com/opentype.js@latest/dist/opentype.min.js"></script>
<script src="https://unpkg.com/opentype.js@^2.0.0/dist/opentype.min.js"></script>
<script src="https://unpkg.com/@sabre-js/sabre@latest/dist/sabre.min.js"></script>
```

Expand Down Expand Up @@ -80,4 +80,4 @@ to render a frame of subtitles.

{{>main}}

&copy; 2012-2022 Patrick "ILOVEPIE" Rhodes Martin.
&copy; 2012-2023 Patrick "ILOVEPIE" Rhodes Martin.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ To view the gallery click [here](/gallery/gallery.md) if you're using a decent b
### Documentation
How to include the library (from the jsdelivr CDN, this cdn is recommended as they publish usage statistics for each package):
```html
<script src="https://cdn.jsdelivr.net/npm/opentype.js@latest/dist/opentype.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/opentype.js@^2.0.0/dist/opentype.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@sabre-js/sabre@latest/dist/sabre.min.js"></script>
```
How to include the library (from the unpkg CDN, for the more privacy minded):
```html
<script src="https://unpkg.com/opentype.js@latest/dist/opentype.min.js"></script>
<script src="https://unpkg.com/opentype.js@^2.0.0/dist/opentype.min.js"></script>
<script src="https://unpkg.com/@sabre-js/sabre@latest/dist/sabre.min.js"></script>
```

Expand Down Expand Up @@ -167,4 +167,4 @@ Fetches a rendered frame of subtitles to a canvas.
| [contextType] | <code>string</code> | the context type to use (must be one of "bitmap" or "2d"), defaults to "bitmap" unless unsupported by the browser, in which case "2d" is the default. |


&copy; 2012-2022 Patrick "ILOVEPIE" Rhodes Martin.
&copy; 2012-2023 Patrick "ILOVEPIE" Rhodes Martin.
2 changes: 1 addition & 1 deletion include/canvas-2d-text-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* nextGlyph:function():{prevGlyph:?Glyph,glyph:?Glyph,breakOut:boolean},
* positionCachedGlyph:function({prevGlyph:?Glyph,glyph:?Glyph,breakOut:boolean}):void,
* renderGlyph:function(number,SSASubtitleEvent,{prevGlyph:?Glyph,glyph:?Glyph,breakOut:boolean},number,boolean):boolean,
* setRequestFont:function(!function(string):!{font:Font,foundItalic:boolean,foundWeight:number}):void,
* setRequestFont:function(!function(string,number,boolean):!{font:Font,foundItalic:boolean,foundWeight:number}):void,
* setPixelScaleRatio:function(number,number):void,
* getOffset:function():Array<number>,
* getOffsetExternal:function():Array<number>,
Expand Down
Loading

0 comments on commit 9293992

Please sign in to comment.