Skip to content

Commit

Permalink
small updates in functionality and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniocosentino committed Aug 11, 2023
1 parent 7490f86 commit e7b3683
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,12 @@ A CSS playground for F-mods (font metric overrides). This tool will help you fin
![WTF demo](/public/demo.gif)

The tool was inspired by [this article](https://developer.chrome.com/blog/font-fallbacks/) on improved font fallbacks.

## Features

- Works with all Google Fonts
- Customize font parameters (size, weight, letter spacing etc.)
- Apply F-mods and see them reflected immediately in the preview area
- Preview crossfader, to "mix" the fallback font and the webfont in the preview area
- Customizable preview text
- CSS snippets ready for copy/paste
5 changes: 3 additions & 2 deletions src/app/components/Interface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -493,12 +493,13 @@ export const Interface = (props: InterfaceProps) => {

<textarea
className="text-slate-600 bg-slate-50 w-full mt-8 resize-none outline-none cursor-pointer"
rows={8}
rows={9}
data-copy-box="left"
onClick={(e) => manageCodeCLick(e)}
readOnly={true}
value={`@font-face {
font-family: "fallback for ${fontName}";
font-weight: ${fontWeight};
src: local(${fallbackFontName});
size-adjust: ${sizeAdjust}%;
ascent-override: ${ascentOverride}%;
Expand All @@ -518,7 +519,7 @@ export const Interface = (props: InterfaceProps) => {

<textarea
className="text-slate-600 bg-slate-50 w-full mt-8 resize-none outline-none cursor-pointer"
rows={8}
rows={9}
data-copy-box="right"
onClick={(e) => manageCodeCLick(e)}
readOnly={true}
Expand Down

0 comments on commit e7b3683

Please sign in to comment.