Skip to content

Commit

Permalink
Version 1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
av01d committed Jan 19, 2022
1 parent 52c82db commit 5fcf2c2
Show file tree
Hide file tree
Showing 6 changed files with 2,087 additions and 330 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/)
and this project adheres to [Semantic Versioning](https://semver.org/).

## [1.5] - 2022-01-19
### Changed
- Added support for TTF, WOFF2 and OTF fonts (configuration parameter `localFontsType`)
- Updated Google Fonts list

## [1.4.5] - 2021-09-28
### Fixed
- Firefox did not load custom fonts properly.
Expand Down
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ An array of Google fonts to present in the font list. Shows all available Google
### localFonts
The Google Fonts Repository doesn't always offer enough options. The fontpicker plugin allows you to present custom fonts as well.
The local font files have to be in `.woff` (not `.ttf`) format (for best compatibility with as many browsers as possible), and they should all be put in a single folder, under the document root folder of your site. Something like `/fonts/` makes sense.
The local font files have to be in `.ttf`, `.woff`, `woff2` or `otf` format, and they should all be put in a single folder, under the document root folder of your site. Something like `/fonts/` makes sense.
Provide the path to this folder as the `localFontsUrl` configuration parameter.
You can convert `.otf/.ttf` fonts to `.woff` on [transfonter.org](https://transfonter.org/), it's a free service.
Use the `localFontsType` to indicate what font format you use.
- Type: `Object`
- Default:
Expand Down Expand Up @@ -225,9 +225,9 @@ You can convert `.otf/.ttf` fonts to `.woff` on [transfonter.org](https://transf
}
```

The key of an item is the *font family*. As mentioned above, make sure that custom (non-system) fonts are available on your webserver, as `.woff` files. Make sure the name of the font files matches the *font family* name used here:
`"Action Man"` -> `/fonts/Action Man.woff`
`"Bubble"` -> `/fonts/Bubble.woff`
The key of an item is the *font family*. As mentioned above, make sure that custom (non-system) fonts are available on your webserver, as `.woff`, `.ttf`, `.woff2` or `.otf` files (`.ttf` or `.woff` are most widely supported across browsers). Make sure the name of the font files matches the *font family* name used here:
`"Action Man"` -> `/fonts/Action Man.[woff|ttf]`
`"Bubble"` -> `/fonts/Bubble.[woff|ttf]`

The value of an item is an object, containing up to 3 properties:
- `category`: A `String`, containing one of `serif, sans-serif, display, handwriting, monospace`. This allows users to filter fonts by category. If omitted, the font is listed under the `other` category.
Expand Down Expand Up @@ -274,6 +274,13 @@ Example:
Path to folder where local fonts are stored (in .woff format). Default: `/fonts/`. *Make sure to end with a slash!*
### localFontsType
- Type: `String`
- Default: `woff`
The type of local fonts you have. Either `woff`, `ttf`, `woff2` or `otf`.
### parentElement
- Type: `String` or `jQuery object`
Expand Down
4 changes: 2 additions & 2 deletions dist/jquery.fontpicker.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* jQuery.fontpicker - A font picker for Google Web Fonts and local fonts.
*
* Made by Arjan Haverkamp, https://www.webgear.nl
* Copyright 2020-2021 Arjan Haverkamp
* Copyright 2020-2022 Arjan Haverkamp
* MIT Licensed
* @version 1.4.3 - 2021-06-09
* @version 1.5 - 2022-01-19
* @url https://github.com/av01d/fontpicker-jquery-plugin
*/

Expand Down
Loading

0 comments on commit 5fcf2c2

Please sign in to comment.