Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added _static/fonts/NotoSansJP-VariableFont_wght.ttf
Binary file not shown.
Binary file not shown.
16 changes: 13 additions & 3 deletions _static/pyos.css
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
/* PyOS-specific vars :) */
/* pyOS-specific vars :) */
:root {
--pyos-color-primary: #703c87;
--pyos-color-secondary: #8045e5;
--pyos-color-secondary-highlight: #591bc2;
--pyos-color-tertiary: #a66c98;
--pyos-color-dark: #542568;
--pyos-color-light: #daabcf;
--pst-font-family-base: "Poppins", "Noto Sans JP", sans-serif;

/* Darkmode Adjustments*/
--pyos-dm-color-primary: #c483e0;

/* Fonts (overrides base theme) */
--pst-font-family-heading: "Poppins", sans-serif;
--pst-font-family-base: "Poppins", sans-serif;
--pst-font-family-heading: "Poppins", "Noto Sans JP", sans-serif;
--pst-font-family-base: "Poppins", "Noto Sans JP", sans-serif;
--pyos-font-family-h1: "Itim", serif;
}

Expand Down Expand Up @@ -257,6 +258,15 @@ See https://github.com/pydata/pydata-sphinx-theme/pull/1784
/* -------------------------------------- */
/* Generated by https://gwfh.mranftl.com/ */

/* support japanese characters */
@font-face {
font-family: "Noto Sans JP";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("./fonts/noto-sans-jp-v54-japanese-regular.woff2") format("woff2");
}

/* poppins-regular - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
Expand Down
11 changes: 11 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
import os
from typing import TYPE_CHECKING
from _ext import rss
# Support add fonts to opengraph (noto sans jp)
import matplotlib.font_manager as fm
from pathlib import Path

if TYPE_CHECKING:
from sphinx.application import Sphinx
Expand Down Expand Up @@ -194,11 +197,19 @@
html_js_files = ["matomo.js", "language_select.js"]




# Path to the custom font
font_path = Path(__file__).parent / "_static/fonts/NotoSansJP-VariableFont_wght.ttf"
fm.fontManager.addfont(str(font_path))

# Social cards
ogp_site_url = "https://www.pyopensci.org/python-package-guide/"
ogp_social_cards = {
"line_color": "#6D597A",
"image": "_static/pyopensci-logo-package-guide.png",
"font": "Noto Sans JP",
"font_path": str(font_path),
}

# Bibliographies
Expand Down
1 change: 1 addition & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
sys.path.insert(0, str(pathlib.Path(__file__).parent.absolute()))
import conf

reuse_existing_virtualenvs = True

## Sphinx related options

Expand Down
Loading