Change font

This commit is contained in:
lowlighter
2020-10-25 00:46:11 +02:00
parent 37d3cefa08
commit 7ddb892f5b
5 changed files with 25 additions and 25 deletions

View File

@@ -84,4 +84,20 @@ This way you'll be able to rapidly test SVG renders with your browser.
* [actions/toolkit](https://github.com/actions/toolkit/tree/master) and [vercel/ncc](https://github.com/vercel/ncc)
* To build the GitHub Action
* [vuejs/vue](https://github.com/vuejs/vue)
* To display server application
* To display server application
### 🗛 Fonts
1. Find a font on [fonts.google.com](https://fonts.google.com/)
- Select regular, bold, italic and bold+italic fonts
- Open `embed` tab and extract the `href`
2. Open extracted `href` and append `&text=` params with used characters from SVG
- e.g. `&text=%26%27"%7C%60%5E%40°%3F!%23%24%25()*%2B%2C-.%2F0123456789%3A%3B<%3D>ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5D_abcdefghijklmnopqrstuvwxyz%7B%7D~─└├▇□✕`
3. Download each font file from url links from the generated stylesheet
4. Convert them into base64 with `woff` extension on [transfonter.org]https://transfonter.org/) and download archive
5. Extract archive and copy the content of the generated stylesheet to `templates/*/fonts.css`
6. Update your template
- Include `<defs><style><%= fonts %></style></defs>` to your `templates/*/image.svg`
- Edit your `templates/*/style.css` to use yout new font

File diff suppressed because one or more lines are too long

View File

@@ -30,7 +30,7 @@
const conf = await setup({log:false})
console.log(`Configuration | loaded`)
//Load svg template, style and query
//Load svg template, style, fonts and query
const template = core.getInput("template") || "classic"
console.log(`Template to use | ${template}`)

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
/* SVG global context */
svg {
font-family: 'Roboto';
font-family: 'Montserrat';
font-size: 14px;
color: #777777;
}