Skip to content

Commit

Permalink
Update CHANGELOG and version.
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiocaccamo committed Dec 18, 2023
1 parent f3451c9 commit d78dc80
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

get_variable_instance_by_style_name

## [0.17.1](https://github.com/fabiocaccamo/python-fontbro/releases/tag/0.17.1) - 2023-12-18
- Add `get_variable_instance_by_style_name` method.
- Increase tests coverage.

## [0.17.0](https://github.com/fabiocaccamo/python-fontbro/releases/tag/0.17.0) - 2023-12-13
- Add `Python 3.12` support.
- Add `get_family_name` / `set_family_name` methods.
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ with open("fonts/MyFont.ttf") as fh:
- [`get_variable_axes_tags`](#get_variable_axes_tags)
- [`get_variable_axis_by_tag`](#get_variable_axis_by_tag)
- [`get_variable_instances`](#get_variable_instances)
- [`get_variable_instance_by_style_name`](#get_variable_instance_by_style_name)
- [`get_variable_instance_closest_to_coordinates`](#get_variable_instance_closest_to_coordinates)
- [`get_version`](#get_version)
- [`get_weight`](#get_weight)
Expand Down Expand Up @@ -476,6 +477,20 @@ Gets the variable instances.
instances = font.get_variable_instances()
```

#### `get_variable_instance_by_style_name`
```python
"""
Gets the variable instance by style name, eg. style_name = 'Bold'
:param style_name: The style name
:type style_name: str
:returns: The variable instance matching the given style name.
:rtype: str or None
"""
instance = font.get_variable_instance_by_style_name(style_name="Bold")
```

#### `get_variable_instance_closest_to_coordinates`
```python
"""
Expand Down

0 comments on commit d78dc80

Please sign in to comment.