mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
style: format caption component HTML files
This commit is contained in:
+13
-3
@@ -274,12 +274,22 @@
|
||||
var CLASS_MAP = { n: "word word--normal", i: "word word--italic", e: "word word--emphasis" };
|
||||
|
||||
function computeLineSize(linePairs) {
|
||||
var hasEmphasis = linePairs.some(function (p) { return p[1] === "e"; });
|
||||
var hasEmphasis = linePairs.some(function (p) {
|
||||
return p[1] === "e";
|
||||
});
|
||||
if (hasEmphasis) {
|
||||
var lineText = linePairs.map(function (p) { return W[p[0]].text; }).join(" ");
|
||||
var lineText = linePairs
|
||||
.map(function (p) {
|
||||
return W[p[0]].text;
|
||||
})
|
||||
.join(" ");
|
||||
return fitFontSize(lineText, 180, "800", "Playfair Display", SAFE_WIDTH);
|
||||
}
|
||||
var lineText = linePairs.map(function (p) { return W[p[0]].text; }).join(" ");
|
||||
var lineText = linePairs
|
||||
.map(function (p) {
|
||||
return W[p[0]].text;
|
||||
})
|
||||
.join(" ");
|
||||
return fitFontSize(lineText, 86, "400", "Inter", SAFE_WIDTH);
|
||||
}
|
||||
|
||||
|
||||
+13
-3
@@ -274,12 +274,22 @@
|
||||
var CLASS_MAP = { n: "word word--normal", i: "word word--italic", e: "word word--emphasis" };
|
||||
|
||||
function computeLineSize(linePairs) {
|
||||
var hasEmphasis = linePairs.some(function (p) { return p[1] === "e"; });
|
||||
var hasEmphasis = linePairs.some(function (p) {
|
||||
return p[1] === "e";
|
||||
});
|
||||
if (hasEmphasis) {
|
||||
var lineText = linePairs.map(function (p) { return W[p[0]].text; }).join(" ");
|
||||
var lineText = linePairs
|
||||
.map(function (p) {
|
||||
return W[p[0]].text;
|
||||
})
|
||||
.join(" ");
|
||||
return fitFontSize(lineText, 180, "800", "Playfair Display", SAFE_WIDTH);
|
||||
}
|
||||
var lineText = linePairs.map(function (p) { return W[p[0]].text; }).join(" ");
|
||||
var lineText = linePairs
|
||||
.map(function (p) {
|
||||
return W[p[0]].text;
|
||||
})
|
||||
.join(" ");
|
||||
return fitFontSize(lineText, 86, "400", "Inter", SAFE_WIDTH);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user