Skip to content

Commit

Permalink
v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
luxluth committed Jul 10, 2023
1 parent a19b9cb commit f0a1538
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/sixty-worms-float.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'ass-html5': minor
---

Adding Some Tweaks
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ Display ASS/SSA subtitles on html5 videos
![Publish workflow](https://github.com/luxluth/ass-html5/actions/workflows/publish.yml/badge.svg)
![License](https://img.shields.io/github/license/luxluth/ass-html5?color=blue)
![npm bundle size](https://img.shields.io/bundlephobia/min/ass-html5)
![npm](https://img.shields.io/npm/v/ass-html5?logo=npm&color=red&link=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fass-html5)
![npm](https://img.shields.io/npm/v/ass-html5?logo=npm&color=white&link=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fass-html5)


**🏗 PROJECT UNDER DEVELOPEMENT 🏗**

</div>


8 changes: 4 additions & 4 deletions src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ export class Renderer {
}

showText(Text: ParsedASSEventText, style: SingleStyle) {
// console.debug(style.Name, Text)
const text = Text.parsed[0]?.text as string
// console.debug(style.Name, text)
const tags = Text.parsed[0]?.tags as Tag[]

let fontDescriptor = this.getFontDescriptor(style) // FontDescriptor
Expand Down Expand Up @@ -108,7 +108,7 @@ export class Renderer {
if (typeof tweaks.angle !== "undefined") { }
if (typeof tweaks.borderStyle !== "undefined") { }
if (typeof tweaks.outline !== "undefined") {
console.debug("tweaks.outline", tweaks.outline)
// console.debug("tweaks.outline", tweaks.outline)
if (tweaks.outline === 0) {
this.ctx.strokeStyle = "rgba(0,0,0,0)"
} else {
Expand Down Expand Up @@ -146,7 +146,7 @@ export class Renderer {
// put all the tags in the same object
let tagsCombined: Tag = {};
tags.forEach((tag) => {tagsCombined = { ...tagsCombined, ...tag }})
console.debug("tagsCombined", tagsCombined)
// console.debug("tagsCombined", tagsCombined)
const primaryColor = typeof tagsCombined.c1 !== "undefined" ? convertAegisubToRGBA("00" + tagsCombined.c1, tags) : undefined;
const secondaryColor = typeof tagsCombined.c2 !== "undefined" ? convertAegisubToRGBA("00" + tagsCombined.c2, tags) : undefined;
const outlineColor = typeof tagsCombined.c3 !== "undefined" ? convertAegisubToRGBA("00" + tagsCombined.c3, tags) : undefined;
Expand Down Expand Up @@ -329,7 +329,7 @@ export class Renderer {
break;
}
if (this.ctx.lineWidth > 0) {
console.debug("strokeText", lineWidth);
// console.debug("strokeText", lineWidth);
this.ctx.strokeText(line, x, y);
}
this.ctx.fillText(line, x, y);
Expand Down

0 comments on commit f0a1538

Please sign in to comment.