Skip to content

Commit

Permalink
Add HG Mincho B to support a Japanese character set (#868)
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-huang authored Jun 18, 2024
1 parent 7ace6d3 commit 40d5868
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"Harkness",
"Hedberg",
"herokuapp",
"hg",
"htmlcov",
"icanhas",
"imgur",
Expand All @@ -75,6 +76,7 @@
"maxsplit",
"Memegen",
"Midwit",
"mincho",
"Minecraft",
"mkdocs",
"Mufasa",
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ Add the `font=<str>` query parameter to customize the look of your meme:
| [Kalam Regular](https://fonts.google.com/specimen/Kalam) | `font=kalam` | `font=comic` |
| [Impact](https://www.dafontfree.io/impact-font/) | `font=impact` | - |
| [Noto Sans Bold](https://fonts.google.com/noto/specimen/Noto+Sans) | `font=notosans` | - |
| [HG Mincho B](https://japanesefonts.org/hg-mincho-b.html) | `font=hgminchob` | `font=jp` |

<br>

Expand Down
1 change: 1 addition & 0 deletions app/models/font.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ def build_self_url(self, request: Request) -> str:
Font("Impact.ttf", "impact"),
Font("TitilliumWeb-SemiBold.ttf", "titilliumweb-thin", alias="thin"),
Font("Segoe UI Bold.ttf", "segoe", alias="tiny"),
Font("HG-Mincho-B.ttc", "hgminchob", alias="jp")
]
2 changes: 1 addition & 1 deletion app/tests/test_views_fonts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ def describe_list():
def describe_GET():
def it_returns_all_fonts(expect, client):
request, response = client.get("/fonts")
expect(len(response.json)) == 6
expect(len(response.json)) == 7


def describe_detail():
Expand Down
Binary file added fonts/HG-Mincho-B.ttc
Binary file not shown.

0 comments on commit 40d5868

Please sign in to comment.