8000 Update documentation by knutnergaard · Pull Request #739 · robotools/fontParts · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update documentation #739

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 49 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
6c8349c
Update normalizers.rst
knutnergaard Jul 22, 2024
8f6a334
Update normalizers.rst
knutnergaard Jul 22, 2024
fc996a6
Merge branch 'robotools:master' into master
knutnergaard Jul 29, 2024
ea2e5e4
Update point.rst
knutnergaard Jul 29, 2024
720c76b
Update point.rst
knutnergaard Jul 29, 2024
ce6c6ee
Merge branch 'robotools:master' into master
knutnergaard Aug 9, 2024
e144b38
Update conf.py
knutnergaard Aug 9, 2024
7a409a5
Add new module for type annotation definitions.
knutnergaard Aug 9, 2024
f34200e
Add type annotations and edit/add documentation.
knutnergaard Aug 9, 2024
8be7901
Update font.py
knutnergaard Aug 9, 2024
bb3c891
fixed name discrepancy in defaultLayer properties.
knutnergaard Aug 9, 2024
dc8f3b6
Merge branch 'master' of https://github.com/knutnergaard/fontParts
knutnergaard Aug 9, 2024
6437d4a
Fix name discrepancy in defaultLayer properties.
knutnergaard Aug 9, 2024
09ec22d
Add overview and reference items.
knutnergaard Aug 10, 2024
39bd22b
Edit minor details.
knutnergaard Aug 10, 2024
e7152b0
Change to .
knutnergaard Aug 12, 2024
6704728
Revert "Change to ."
knutnergaard Aug 12, 2024
f2fd3ad
Changed type.py to types.py and updtated font.py accordingly.
knutnergaard Aug 12, 2024
4e2e5cb
Recommitting due to error.
knutnergaard Aug 12, 2024
ca4b8b7
- Update _getReverseComponentMapping and _getReverseComponentMapping …
knutnergaard Aug 13, 2024
28a7464
Revise documentation.
knutnergaard Sep 2, 2024
9959124
Add annotations.py.
knutnergaard Sep 2, 2024
d2366f2
Remove types.py.
knutnergaard Sep 2, 2024
2c98baa
Revise documentation.
knutnergaard Sep 2, 2024
ac54672
Fixed type annotation.
knutnergaard Sep 2, 2024
fa52b70
Add documentation tools folder and module for docstring generation.
knutnergaard Sep 9, 2024
0d97f96
vert "Add documentation tools folder and module for docstring generat…
knutnergaard Sep 9, 2024
6253854
Merge branch 'robotools:master' into master
knutnergaard Sep 10, 2024
1f108f7
Add docstring generation module.
knutnergaard Sep 14, 2024
52f0e5a
Merge branch 'master' of https://github.com/knutnergaard/fontParts
knutnergaard Sep 14, 2024
a8ec91e
Refacor extraction of exceptions and normalizers with new CodeAnalyze…
knutnergaard Sep 15, 2024
fc4b321
Add type annotation.
knutnergaard Sep 18, 2024
f72b3c1
Update fonttools from 4.53.1 to 4.54.1 (#746)
pyup-bot Sep 24, 2024
b55089f
Revise and add annotation and documentation.
knutnergaard Oct 2, 2024
45c5b46
correct naming error.
knutnergaard Oct 3, 2024
42c7a9d
Add/improve documentation.
knutnergaard Oct 3, 2024
1dca76c
Add documentation regarding review to `rererence` function.
knutnergaard Oct 3, 2024
d39beb7
Add/improve documentation.
knutnergaard Oct 3, 2024
2bfa558
Update base.py (#750)
benkiel Oct 3, 2024
eb4bd2f
Edit `base.py`
knutnergaard Oct 9, 2024
c848b8a
update docstrings of `base.reference` and `BaseBPoint.type`.
knutnergaard Oct 9, 2024
79c138c
Improve documentation and correct errors.
knutnergaard Oct 29, 2024
3e7bd93
Add new normalization notes to docstrings and correct tense in excist…
knutnergaard Oct 29, 2024
9e869d5
Add documentation.
knutnergaard Oct 29, 2024
182e50e
Remove provisional Abstract Members section and accompanying imports.
knutnergaard Oct 29, 2024
1d4aa09
Correct error in `_setItem` docstring.
knutnergaard Oct 29, 2024
c1bd236
Fix missing m
benkiel Oct 29, 2024
fc60d71
Correct errors in `BaseDict.update` and `BaseGlyph.appendComponent`.
knutnergaard Oct 29, 2024
b6c8f29
Merge branch 'master' of https://github.com/knutnergaard/fontParts
knutnergaard Oct 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions Lib/fontParts/base/annotations.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# pylint: disable=C0103, C0114

from __future__ import annotations
from typing import Dict, List, Protocol, Tuple, TypeVar, Union

from fontTools.pens.basePen import AbstractPen
from fontTools.pens.pointPen import AbstractPointPen

# ------------
# Type Aliases
# ------------

# Builtins

T = TypeVar('T')
CollectionType = Union[List[T], Tuple[T, ...]]
IntFloatType = Union[int, float]

# FontTools

PenType = AbstractPen
PointPenType = AbstractPointPen

# FontParts

BoundsType = Tuple[IntFloatType, IntFloatType, IntFloatType, IntFloatType]
CharacterMappingType = Dict[int, Tuple[str, ...]]
ColorType = Tuple[IntFloatType, IntFloatType, IntFloatType, IntFloatType]
CoordinateType = Tuple[IntFloatType, IntFloatType]
FactorType = Union[IntFloatType, Tuple[IntFloatType, IntFloatType]]
InterpolatableType = TypeVar('InterpolatableType', bound='Interpolatable')
KerningKeyType = Tuple[str, str]
KerningDictType = Dict[KerningKeyType, IntFloatType]
ReverseComponentMappingType = Dict[str, Tuple[str, ...]]
ScaleType = Tuple[IntFloatType, IntFloatType]
TransformationMatrixType = Tuple[
IntFloatType, IntFloatType, IntFloatType,
IntFloatType, IntFloatType, IntFloatType
]


class Interpolatable(Protocol):
"""Represent a protocol for interpolatable types."""

def __add__(self, other: InterpolatableType) -> InterpolatableType: ...
def __sub__(self, other: InterpolatableType) -> InterpolatableType: ...
def __mul__(self, other: FactorType) -> InterpolatableType: ...
Loading
0