Skip to content

Instantly share code, notes, and snippets.

@fallsimply
Last active May 22, 2021 20:07
Show Gist options
  • Save fallsimply/eb4945ea5b5d41b167efdfbc25e8431d to your computer and use it in GitHub Desktop.
Save fallsimply/eb4945ea5b5d41b167efdfbc25e8431d to your computer and use it in GitHub Desktop.

Regexp

Find: (\w+) (\d+)

Replace:

<font
	android:fontStyle="normal"
	android:fontWeight="$2"
	android:font="@font/inter_$1" />
<font
	android:fontStyle="italic"
	android:fontWeight="$2"
	android:font="@font/inter_$1_italic" />

List

thin 100
extralight 200
light 300
regular 400
medium 500
semibold 600
bold 700
extrabold 800
black 900

Script

Google Fonts

copy($$(".variant__style").map(e => e.innerText).join("\n"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment