feat(FontSampler): slight font style tweaks for font name

This commit is contained in:
Ilia Mashkov
2026-02-18 16:57:52 +03:00
parent 010b8ad04b
commit 20f65ee396

View File

@@ -36,12 +36,7 @@ interface Props {
letterSpacing?: number; letterSpacing?: number;
} }
let { let { font, text = $bindable(), index = 0, ...restProps }: Props = $props();
font,
text = $bindable(),
index = 0,
...restProps
}: Props = $props();
const fontWeight = $derived(controlManager.weight); const fontWeight = $derived(controlManager.weight);
const fontSize = $derived(controlManager.renderedSize); const fontSize = $derived(controlManager.renderedSize);
@@ -66,9 +61,9 @@ const letterSpacing = $derived(controlManager.spacing);
typeface_{String(index).padStart(3, '0')} typeface_{String(index).padStart(3, '0')}
</Footnote> </Footnote>
<div class="w-px h-2 sm:h-2.5 bg-border-subtle"></div> <div class="w-px h-2 sm:h-2.5 bg-border-subtle"></div>
<Footnote class="tracking-[0.15em] font-bold text-foreground"> <div class="font-bold text-foreground">
{font.name} {font.name}
</Footnote> </div>
</div> </div>
<!-- <!--
@@ -86,11 +81,11 @@ const letterSpacing = $derived(controlManager.spacing);
<div class="p-4 sm:p-5 md:p-8 relative z-10"> <div class="p-4 sm:p-5 md:p-8 relative z-10">
<FontApplicator {font} weight={fontWeight}> <FontApplicator {font} weight={fontWeight}>
<ContentEditable <ContentEditable
bind:text={text} bind:text
{...restProps} {...restProps}
fontSize={fontSize} {fontSize}
lineHeight={lineHeight} {lineHeight}
letterSpacing={letterSpacing} {letterSpacing}
/> />
</FontApplicator> </FontApplicator>
</div> </div>