Skip to content

Instantly share code, notes, and snippets.

@fallsimply
Last active May 22, 2021 20:07
Show Gist options
  • Select an option

  • Save fallsimply/eb4945ea5b5d41b167efdfbc25e8431d to your computer and use it in GitHub Desktop.

Select an option

Save fallsimply/eb4945ea5b5d41b167efdfbc25e8431d to your computer and use it in GitHub Desktop.

Revisions

  1. fallsimply revised this gist May 22, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion fonts.android.md
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,7 @@ Replace:
    android:font="@font/inter_$1_italic" />
    ```

    # List:
    # List
    ```
    thin 100
    extralight 200
  2. fallsimply revised this gist May 22, 2021. 1 changed file with 6 additions and 4 deletions.
    10 changes: 6 additions & 4 deletions fonts.android.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,7 @@
    FIND: `(\w+) (\d+)`
    # Regexp
    Find: `(\w+) (\d+)`

    REPLACE:
    Replace:
    ```
    <font
    android:fontStyle="normal"
    @@ -12,7 +13,7 @@ REPLACE:
    android:font="@font/inter_$1_italic" />
    ```

    LIST (Example):
    # List:
    ```
    thin 100
    extralight 200
    @@ -25,7 +26,8 @@ extrabold 800
    black 900
    ```

    Google Fonts Userscript
    # Script
    Google Fonts
    ```
    copy($$(".variant__style").map(e => e.innerText).join("\n"))
    ```
  3. fallsimply revised this gist May 22, 2021. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion fonts.android.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    FIND: `(\w+) (\d+)`
    FIND: `(\w+) (\d+)`

    REPLACE:
    ```
    <font
  4. fallsimply revised this gist May 22, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion fonts.android.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    FIND: `(\w+) (\d+)`
    FIND: `(\w+) (\d+)`
    REPLACE:
    ```
    <font
  5. fallsimply created this gist May 22, 2021.
    30 changes: 30 additions & 0 deletions fonts.android.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    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 (Example):
    ```
    thin 100
    extralight 200
    light 300
    regular 400
    medium 500
    semibold 600
    bold 700
    extrabold 800
    black 900
    ```

    Google Fonts Userscript
    ```
    copy($$(".variant__style").map(e => e.innerText).join("\n"))
    ```