Skip to content

Commit 9356a3a

Browse files
committed
Updated README, CHANGELOG and version.
1 parent 072cc8d commit 9356a3a

File tree

3 files changed

+51
-43
lines changed

3 files changed

+51
-43
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.3.0](https://github.com/fabiocaccamo/python-fontbro/releases/tag/0.3.0) - 2022-01-??
8+
- Added `get_unicode_blocks` method.
9+
- Added `get_unicode_scripts` method.
10+
- Changed `get_name` and `set_name` to read/write both Mac and Windows IDs.
11+
- Fixed hardcoded class name in `__str__` method.
12+
- Fixed `setup.py` warning and updated to `tox` configuration.
13+
- Removed `get_scripts` method.
14+
- Removed `get_scripts_by_characters` class method.
15+
- Replaced single quotes `'` with double quotes `"` (**Black** formatting).
16+
17+
## [0.2.3](https://github.com/fabiocaccamo/python-fontbro/releases/tag/0.2.3) - 2021-12-09
18+
- Added `get_scripts_by_characters` class method.
19+
- Fixed `TypeError` raised on save after renaming.
20+
- Fixed `get_name` and `set_name` langID parameter.
21+
- Improved `subset` unicodes string parsing.
22+
- Replaced **Travis CI** with **Github Workflow**.
23+
- Formatted code with **Black**.
24+
725
## [0.2.2](https://github.com/fabiocaccamo/python-fontbro/releases/tag/0.2.2) - 2021-11-25
826
- Fixed `rename` method to raise a `ValueError` when the computed PostScript name exceeds the allowed max-length (63).
927
- Fixed `to_sliced_variable` when axes coordinates are passed as dict doesn't contain 'min' or 'max' keys.

README.md

Lines changed: 32 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,11 @@ font = Font('fonts/MyFont.ttf')
4545
- [`get_format`](#get_format)
4646
- [`get_name`](#get_name)
4747
- [`get_names`](#get_names)
48-
- [`get_script_by_character`](#get_script_by_character)
49-
- [`get_script_by_code`](#get_script_by_code)
50-
- [`get_scripts`](#get_scripts)
5148
- [`get_style_flag`](#get_style_flag)
5249
- [`get_style_flags`](#get_style_flags)
5350
- [`get_ttfont`](#get_ttfont)
51+
- [`get_unicode_blocks`](#get_unicode_blocks)
52+
- [`get_unicode_scripts`](#get_unicode_scripts)
5453
- [`get_variable_axes`](#get_variable_axes)
5554
- [`get_variable_axis_by_tag`](#get_variable_axis_by_tag)
5655
- [`get_variable_axes_tags`](#get_variable_axes_tags)
@@ -159,45 +158,6 @@ Gets the names records mapped by their property name.
159158
names = font.get_names()
160159
```
161160

162-
- #### get_script_by_character
163-
```python
164-
"""
165-
Gets the script by character.
166-
167-
:param char: The character
168-
:type char: str
169-
170-
:returns: The script by character.
171-
:rtype: dict
172-
"""
173-
script = font.get_script_by_character(char='a')
174-
```
175-
176-
- #### get_script_by_code
177-
```python
178-
"""
179-
Gets the script by unicode code point.
180-
181-
:param code: The code
182-
:type code: int
183-
184-
:returns: The script by code.
185-
:rtype: dict
186-
"""
187-
script = font.get_script_by_code(code=34)
188-
```
189-
190-
- #### get_scripts
191-
```python
192-
"""
193-
Gets the scripts supported by the font.
194-
195-
:returns: The scripts.
196-
:rtype: list of dict
197-
"""
198-
scripts = font.get_scripts()
199-
```
200-
201161
- #### get_style_flag
202162
```python
203163
"""
@@ -234,6 +194,36 @@ Gets the wrapped TTFont instance.
234194
ttfont = font.get_ttfont()
235195
```
236196

197+
- #### get_unicode_blocks
198+
```python
199+
"""
200+
Gets the unicode blocks and their coverage.
201+
Only blocks with coverage >= coverage_threshold (0.0 <= coverage_threshold <= 1.0) will be returned.
202+
203+
:param coverage_threshold: The minumum required coverage for a block to be returned.
204+
:type coverage_threshold: float
205+
206+
:returns: The list of unicode blocks.
207+
:rtype: list of dicts
208+
"""
209+
blocks = font.get_unicode_blocks(coverage_threshold=0.00001)
210+
```
211+
212+
- #### get_unicode_scripts
213+
```python
214+
"""
215+
Gets the unicode scripts and their coverage.
216+
Only scripts with coverage >= coverage_threshold (0.0 <= coverage_threshold <= 1.0) will be returned.
217+
218+
:param coverage_threshold: The minumum required coverage for a script to be returned.
219+
:type coverage_threshold: float
220+
221+
:returns: The list of unicode scripts.
222+
:rtype: list of dicts
223+
"""
224+
scripts = font.get_unicode_scripts(coverage_threshold=0.00001)
225+
```
226+
237227
- #### get_variable_axes
238228
```python
239229
"""

fontbro/metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
__email__ = '[email protected]'
77
__license__ = 'MIT'
88
__title__ = 'python-fontbro'
9-
__version__ = '0.2.3'
9+
__version__ = '0.3.0'

0 commit comments

Comments
 (0)