Change font
This commit is contained in:
@@ -85,3 +85,19 @@ This way you'll be able to rapidly test SVG renders with your browser.
|
|||||||
* To build the GitHub Action
|
* To build the GitHub Action
|
||||||
* [vuejs/vue](https://github.com/vuejs/vue)
|
* [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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
2
action/dist/index.js
vendored
2
action/dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -30,7 +30,7 @@
|
|||||||
const conf = await setup({log:false})
|
const conf = await setup({log:false})
|
||||||
console.log(`Configuration | loaded`)
|
console.log(`Configuration | loaded`)
|
||||||
|
|
||||||
//Load svg template, style and query
|
//Load svg template, style, fonts and query
|
||||||
const template = core.getInput("template") || "classic"
|
const template = core.getInput("template") || "classic"
|
||||||
console.log(`Template to use | ${template}`)
|
console.log(`Template to use | ${template}`)
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
|||||||
/* SVG global context */
|
/* SVG global context */
|
||||||
svg {
|
svg {
|
||||||
font-family: 'Roboto';
|
font-family: 'Montserrat';
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #777777;
|
color: #777777;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user