GithubHelp home page GithubHelp logo

masakudamatsu / masakudamatsu.dev Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 753 KB

The source code (a single HTML file with inline CSS and JavaScript) for Masa Kudamatsu's portfolio site, showcasing his web development works and blog articles along with self-introduction

Home Page: https://masakudamatsu.dev

HTML 97.88% Shell 0.04% JavaScript 2.08%
portfolio-website

masakudamatsu.dev's Introduction

Masa Kudamatsu's portfolio website

Font subsetting

Custom fonts are all served via self-hosted subsetted font files, rather than via webfont servers, to improve the performance on largest contentful paint (LCP).

To subset font files to the glyphs actually used on the site, first start a local host server at http://localhost:8080. Then run the following command:

npm run subset

The subset script executes glyphhanger, which crawls the website at http://localhost:8080 to record the glyphs actually used and then subsets font files to these glyphs only.

However, the subset script requires a set of external resources as described below.

Glyphhanger dependencies

Glyphhanger relies on three Python libraries: fonttools, brotli, and zopfli. To install them in your local computer (assuming Python 3.6 or higher is already installed), use pip3:

pip3 install fonttools
pip3 install brotli
pip3 install zopfli

The installation of fonttools may return the following warning:

WARNING: The scripts fonttools, pyftmerge, pyftsubset and ttx are installed in '/Users/kudamatsu/Library/Python/3.9/bin' which is not on PATH.

where kudamatsu is an example user name.

If this happens, add the directory path mentioned in the warning to PATH. For macOS Catalina or later, open ~/.zshrc (or create one if it doesn't exist) and add the following line:

export PATH="/Users/kudamatsu/Library/Python/3.9/bin:$PATH"

where kudamatsu is an example user name.

Finally, to activate this new configuration, execute the following command:

source ~/.zshrc

Master font files

In the root directory, create a folder called font-original.

In this folder, download master font files:

masakudamatsu.dev's People

Contributors

masakudamatsu avatar

Watchers

 avatar

masakudamatsu.dev's Issues

Focus cycle

Currently, pressing Tab key sometimes fails to show any element being focused. This can confuse the keyboard users.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.