Skip to content

Commit e45951e

Browse files
committed
wip: Roboto Flex use ttf with support for variantStyles
1 parent bf14378 commit e45951e

File tree

7 files changed

+18
-3
lines changed

7 files changed

+18
-3
lines changed

packages/webui/src/client/styles/countdown/director.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ $hold-status-color: $liveline-timecode-color;
8181
padding-left: 10px;
8282
font-size: 20em;
8383
font-weight: 500;
84-
line-height: 100%;
84+
line-height: 120%;
8585
letter-spacing: 0%;
8686
vertical-align: middle;
8787
color: #fff;

packages/webui/src/client/styles/fonts/sass/_RobotoFlex.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* BEGIN Roboto Flex */
22
@font-face {
33
font-family: 'Roboto Flex';
4-
@include fontdef-woff($FontPath, 'RobotoFlex', $FontVersion, 'Regular');
4+
@include fontdef-ttf($FontPath, 'RobotoFlex', $FontVersion, 'Regular');
55
font-weight: 400;
66
font-style: normal;
77
}

packages/webui/src/client/styles/fonts/sass/_mixins.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
src: url('#{$FontPath}/#{$FontType}/#{$FontName}-#{$FontType}.woff2?v=#{$FontVersion}') format('woff2'),
33
url('#{$FontPath}/#{$FontType}/#{$FontName}-#{$FontType}.woff?v=#{$FontVersion}') format('woff');
44
}
5+
6+
@mixin fontdef-ttf($FontPath, $FontName, $FontVersion: '1.0.0', $FontType: 'Regular') {
7+
src: url('#{$FontPath}/#{$FontType}/#{$FontName}-#{$FontType}.ttf?v=#{$FontVersion}') format('truetype');
8+
}

packages/webui/src/client/ui/ClockView/DirectorScreen.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,18 @@ function DirectorScreenRender({
479479
next: nextSegment !== undefined && nextSegment?._id !== currentSegment?._id,
480480
})}
481481
>
482-
{nextSegment?._id !== currentSegment?._id ? nextSegment?.name : undefined}
482+
{nextSegment?._id !== currentSegment?._id ? (
483+
<AdjustLabelFit
484+
label={nextSegment?.name || ''}
485+
width={'80vw'}
486+
fontFamily="Roboto Flex"
487+
fontSize="1em"
488+
minFontSize={70}
489+
maxFontSize={100}
490+
minLetterSpacing={0}
491+
hardCutText={true}
492+
/>
493+
) : undefined}
483494
</div>
484495
{nextPartInstance && nextShowStyleBaseId ? (
485496
<>
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)