pax_global_header 0000666 0000000 0000000 00000000064 14671313014 0014512 g ustar 00root root 0000000 0000000 52 comment=9bfbaa71b3b5ae4309077d0c364bc04488b8b068
ManimPango-0.6.0/ 0000775 0000000 0000000 00000000000 14671313014 0013543 5 ustar 00root root 0000000 0000000 ManimPango-0.6.0/.codecov.yml 0000664 0000000 0000000 00000000015 14671313014 0015762 0 ustar 00root root 0000000 0000000 comment: off
ManimPango-0.6.0/.coveragerc 0000664 0000000 0000000 00000000641 14671313014 0015665 0 ustar 00root root 0000000 0000000 [run]
plugins = Cython.Coverage
omit =
packing
data_file = .coverage/data
source = manimpango
[report]
skip_empty = true
ignore_errors = true
exclude_lines =
pragma: no cover
def __repr__
if self.debug:
raise AssertionError
raise NotImplementedError
except Exception as e:
[html]
directory = .coverage/html
[xml]
output = .coverage/coverage.xml
[json]
output = .coverage/coverage.json
ManimPango-0.6.0/.flake8 0000664 0000000 0000000 00000000136 14671313014 0014716 0 ustar 00root root 0000000 0000000 [flake8]
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist,tests/generate_data.py
ManimPango-0.6.0/.github/ 0000775 0000000 0000000 00000000000 14671313014 0015103 5 ustar 00root root 0000000 0000000 ManimPango-0.6.0/.github/CODEOWNERS 0000664 0000000 0000000 00000000035 14671313014 0016474 0 ustar 00root root 0000000 0000000 * @naveen521kk @PhilippImhof
ManimPango-0.6.0/.github/release-drafter.yml 0000664 0000000 0000000 00000000502 14671313014 0020670 0 ustar 00root root 0000000 0000000 name-template: 'ManimPango v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '№ Features'
labels:
- 'feature'
- 'enhancement'
- title: '№ Bug Fixes'
labels:
- 'bug'
- title: '№ЇА Maintenance'
label: 'chore'
template: |
## Whatтs Changed
$CHANGES
ManimPango-0.6.0/.github/workflows/ 0000775 0000000 0000000 00000000000 14671313014 0017140 5 ustar 00root root 0000000 0000000 ManimPango-0.6.0/.github/workflows/build.yml 0000664 0000000 0000000 00000015051 14671313014 0020764 0 ustar 00root root 0000000 0000000 name: Build Wheels
on:
push:
branches:
- main
- fix-wheel-build
- v*
release:
types: [created]
jobs:
build_wheels:
name: Build Wheels on ${{ matrix.os }}-${{ matrix.platform_id }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# Run 32 and 64 bit version in parallel for Windows
- os: windows-2022
platform_id: win_amd64
architecture: x64
- os: windows-2022
platform_id: win32
architecture: x86
- os: macos-13
platform_id: macosx_x86_64
architecture: x64
- os: macos-14
platform_id: macosx_arm64
architecture: arm64
env:
CIBW_BUILD: cp39-${{ matrix.platform_id }} cp310-${{ matrix.platform_id }} cp311-${{ matrix.platform_id }} cp312-${{ matrix.platform_id }} cp313-${{ matrix.platform_id }}
CIBW_SKIP: pp* cp36* cp37* cp38*
CIBW_BEFORE_BUILD_MACOS: "python packing/download_pango_macos.py ${{ matrix.architecture }}"
CIBW_BEFORE_BUILD_WINDOWS: "python packing/download_dlls.py"
CIBW_ENVIRONMENT_WINDOWS: "PKG_CONFIG_PATH='C:\\cibw\\vendor\\lib\\pkgconfig'"
CIBW_ENVIRONMENT_MACOS: "PKG_CONFIG_PATH='/Users/runner/pangobuild/lib/pkgconfig'"
CIBW_TEST_REQUIRES: pytest pytest-cov
CIBW_TEST_COMMAND: "bash {project}/packing/test_wheels.sh {project}"
steps:
- uses: actions/checkout@v4
- name: Set Path for pkg-config
if: runner.os == 'windows'
run: |
$env:Path = "C:\cibw\pkg-config\bin;C:\cibw\vendor\bin;$($env:PATH)"
echo "$env:Path" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Build wheels (Windows)
if: runner.os == 'windows'
shell: pwsh
run: |
Copy-Item packing/LICENSE.bin .
Rename-Item LICENSE.bin LICENSE.win32
- name: Build wheels (Non-Windows)
if: runner.os != 'windows'
run: |
cp packing/LICENSE.bin .
- name: Build wheels
uses: pypa/cibuildwheel@v2.20.0
env:
PKG_CONFIG_PATH: "C:\\cibw\\vendor\\lib\\pkgconfig"
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
name: wheels-${{ runner.os }}-${{ matrix.platform_id }}
test_wheels_win:
name: Test wheels on Windows - ${{ matrix.platform_id }} (${{ matrix.python-version }})
needs: [build_wheels]
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
architecture: [x64, x86]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
include: [
{platform_id: win_amd64, architecture: x64},
{platform_id: win32, architecture: x86},
]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
allow-prereleases: true
- uses: actions/download-artifact@v3
with:
name: wheels-${{ runner.os }}-${{ matrix.platform_id }}
path: ~/wheelhouse
- name: Install test dependencies
run: |
pip install pytest pytest-cov
- name: Install wheels
run: |
pip install --no-index --find-links ~/wheelhouse ManimPango
- name: Run tests
shell: bash
run: |
bash packing/test_wheels.sh $(pwd)
test_wheels_mac:
name: Test wheels on macOS - ${{ matrix.platform_id }} (${{ matrix.python-version }})
needs: [build_wheels]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
architecture: [x64, arm64]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
include: [
{platform_id: macosx_x86_64, architecture: x64, os: macos-13},
{platform_id: macosx_arm64, architecture: arm64, os: macos-14},
]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture == 'arm64' && null || matrix.architecture }}
allow-prereleases: true
- uses: actions/download-artifact@v3
with:
name: wheels-${{ runner.os }}-${{ matrix.platform_id }}
path: ~/wheelhouse
- name: Install test dependencies
run: |
pip install pytest pytest-cov
- name: Install wheels
run: |
pip install --no-index --find-links ~/wheelhouse ManimPango
- name: Run tests
shell: bash
run: |
bash packing/test_wheels.sh $(pwd)
build_sdist:
name: Source distribution
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
sudo apt install libcairo2-dev pkg-config python3-dev
sudo apt-get install libpango1.0-dev
python -m pip install --upgrade build
- name: Build sdist
run: python -m build --sdist
- name: Test sdist
run: |
python -m pip install dist/*.tar.gz
- name: Store artifacts
uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
name: manimpango-src
publish:
needs: [test_wheels_mac, test_wheels_win, build_sdist]
name: Upload wheels to PyPI
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/ManimPango
permissions:
id-token: write
contents: write
if: github.event_name== 'release'
steps:
- uses: actions/download-artifact@v3
with:
path: downloads/
- name: Move files to dist
run: |
mkdir -p dist/
find downloads/ -name \*.whl -exec cp {} dist \;
find downloads/ -name \*.tar.gz -exec cp {} dist \;
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Release
uses: softprops/action-gh-release@v2
with:
fail_on_unmatched_files: false
files: |
dist/*.whl
dist/*.tar.gz
success:
needs: [test_wheels_win, test_wheels_mac]
runs-on: ubuntu-latest
name: Building and testing of wheels success
steps:
- name: Success
run: echo "Building and testing of wheels success"
ManimPango-0.6.0/.github/workflows/lint.yml 0000664 0000000 0000000 00000001567 14671313014 0020642 0 ustar 00root root 0000000 0000000 name: Lint
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
name: Lint
steps:
- uses: actions/checkout@v3
- name: pip cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: lint-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
lint-pip-
- name: pre-commit cache
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: lint-pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }}
restore-keys: |
lint-pre-commit-
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install -U pre-commit
- name: Lint
run: |
pre-commit run --all-files --show-diff-on-failure
env:
PRE_COMMIT_COLOR: always
ManimPango-0.6.0/.github/workflows/release-drafter.yml 0000664 0000000 0000000 00000000473 14671313014 0022734 0 ustar 00root root 0000000 0000000 name: Release Drafter
on:
push:
branches:
- main
- v*
pull_request:
types: [opened, reopened, synchronize]
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ManimPango-0.6.0/.github/workflows/tests.yml 0000664 0000000 0000000 00000007632 14671313014 0021035 0 ustar 00root root 0000000 0000000 name: Test
on:
push:
branches: [main, tests-build, v*]
pull_request:
branches: [main, v*]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: ${{ matrix.os }} - ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install Dependency and Configure
if: runner.os == 'macOS'
run: |
brew install cairo
echo "LD_LIBRARY_PATH=$HOME/pangoprefix/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=$HOME/pangoprefix/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
- name: Set ENV
if: runner.os == 'Linux'
run: |
echo "LD_LIBRARY_PATH=$HOME/pangoprefix/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=$HOME/pangoprefix/lib/x86_64-linux-gnu/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
- name: Cache Pango
id: cache-pango
uses: actions/cache@v3
with:
path: ~/pangoprefix
key: ${{ hashFiles('packing/build_pango_tests.sh') }}-${{ runner.os }}
- name: Install System Dependency
if: steps.cache-pango.outputs.cache-hit != 'true'
run: |
source packing/build_pango_tests.sh
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Build Project
run: python setup.py build_ext -i
- name: Run Tests
run: pytest -s
- uses: codecov/codecov-action@v3
with:
file: ./.coverage/coverage.xml
- uses: actions/upload-artifact@v3
with:
name: test-artifacts-${{matrix.os}}-${{matrix.python-version}}
path: .pytest_temp/
msvc:
name: ${{matrix.os}} - ${{matrix.python-version}} - ${{matrix.architecture}}
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [windows-2022]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
architecture: ["x64", "x86"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }} for ${{matrix.architecture}}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: ${{matrix.architecture}}
allow-prereleases: true
- name: Download Binary
run: |
python packing/download_dlls.py
- name: Set Path for pkg-config
run: |
$env:Path = "C:\cibw\pkg-config\bin;C:\cibw\vendor\bin;$($env:PATH)"
echo "$env:Path" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install Python Dependencies
run: |
python -m pip install -U pip
pip install -U setuptools wheel
pip install -r requirements-dev.txt
- name: Build Project
env:
PKG_CONFIG_PATH: C:\cibw\vendor\lib\pkgconfig
run: python setup.py build_ext -i
- name: Run tests
run: |
pytest -s
- uses: actions/upload-artifact@v3
with:
name: test-artifacts-${{matrix.os}}-${{matrix.python-version}} ${{matrix.architecture}}
path: .pytest_temp/
success-win:
needs: [msvc]
runs-on: ubuntu-latest
name: Windows Test Successful
steps:
- name: Success
run: echo Windows Test Successful
success-all:
needs: [test]
runs-on: ubuntu-latest
name: Mac and Linux Test Successful
steps:
- name: Success
run: echo Mac and Linux Test Successful
ManimPango-0.6.0/.gitignore 0000664 0000000 0000000 00000004164 14671313014 0015540 0 ustar 00root root 0000000 0000000 # Prerequisites
# Byte-compiled / optimized / DLL files
__pycache__/
docs/reference
docs/_build
*.py[cod]
*$py.class
*.c
# C extensions
*.so
*.dll
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
*.c
*.cbp
*.svg
.vscode
!tests/cases/*.svg
#temp folder
.pytest_temp
.venv*
ManimPango-0.6.0/.pre-commit-config.yaml 0000664 0000000 0000000 00000001307 14671313014 0020025 0 ustar 00root root 0000000 0000000 repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: fix-encoding-pragma
- id: mixed-line-ending
- id: check-merge-conflict
- repo: https://github.com/psf/black
rev: 24.8.0
hooks:
- id: black
language_version: python3.11
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
hooks:
- id: flake8
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: rst-backticks
ManimPango-0.6.0/.readthedocs.yaml 0000664 0000000 0000000 00000000334 14671313014 0016772 0 ustar 00root root 0000000 0000000 version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
apt_packages:
- libpango1.0-dev
python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
formats: all
ManimPango-0.6.0/CODE_OF_CONDUCT.md 0000664 0000000 0000000 00000000275 14671313014 0016346 0 ustar 00root root 0000000 0000000 # Code of Conduct
If you haven't read our code of conduct, please do so at the
[manim repository](https://github.com/ManimCommunity/manim/blob/master/CODE_OF_CONDUCT.md#code-of-conduct).
ManimPango-0.6.0/LICENSE 0000664 0000000 0000000 00000002053 14671313014 0014550 0 ustar 00root root 0000000 0000000 MIT License
Copyright (c) 2021 Naveen M K
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
ManimPango-0.6.0/MANIFEST.in 0000664 0000000 0000000 00000000342 14671313014 0015300 0 ustar 00root root 0000000 0000000 global-include *.pyx *.pxd *.pxi
recursive-include tests *.py *.ttf LICENSE.txt *.svg
recursive-include docs *.rst *.py make* _*/*
prune docs/_build
include *.md
include *.txt
include .coveragerc
include LICENSE*
prune *env*/
ManimPango-0.6.0/README.md 0000664 0000000 0000000 00000015122 14671313014 0015023 0 ustar 00root root 0000000 0000000 # ManimPango
**ManimPango** is a C binding for [Pango](https://pango.gnome.org/) using [Cython](https://cython.org/), which is internally used in [Manim](https://www.manim.community) to render (non-LaTeX) text.
## INSTALL
Installing **ManimPango** is super easy, just use `pip`. It is [`manimpango`](https://pypi.org/project/manimpango/) in PyPi.
```sh
pip install manimpango
```
For **Linux Users**, there are no Wheels. You must have a C compiler as well as **Pango** and its dependencies along with the **Pango** development headers. See [BUILDING](#BUILDING) for more information.
## WORKFLOW SETUP / CONTRIBUTING
To make it easier for developers to contribute, we have a pre-commit workflow that will check for `black` formatting and `flake` checking.
```sh
pip install pre-commit
pre-commit install
```
## BUILDING
### Linux/MacOS
For building **ManimPango**, you need
* a C compiler
* Python's development headers
* [`pkg-config`](https://www.freedesktop.org/wiki/Software/pkg-config/)
* [Pango](https://pango.gnome.org) along with its development headers and its dependencies.
If you are on MacOS, you can use [brew](https://brew.sh) to install those. Using [MacPorts](https://www.macports.org) is also possible.
```sh
brew install pango pkg-config
```
If you are on Linux, you can use a system package manager to do so. For example, if you are on Debian based system, you can use `apt`
```sh
apt install libpango1.0-dev pkg-config python3-dev
```
**Arch Linux:** `pacman -S pango pkgconf`
**Fedora:** `dnf install pango-devel pkg-config python3-devel`
Or similar in your system's package manager.
#### Using `tar` archives
If you don't want to contribute to this repository, you can use the tar archives published in PyPi, or just use `pip` to install using
```sh
pip install manimpango --no-binary :all:
```
**Note**: `pip` by default uses wheels, so make sure to pass the `--no-binary` parameter.
#### Using `git` clones / Contributing
Please remember to do this inside your virtual environment, if you want to use your **Manimpango** with **Manim**.
```sh
python -m venv ./venv
source venv/bin/activate # Linux/macOS
venv\Scripts\activate # Windows
```
If you are using a clone of this repository, you will need [Cython](https://cython.org) which can be easily installed using `pip`:
```sh
pip install Cython
```
After that you can use `pip` to install the clone with the following command:
```sh
pip install -e .
pip install -r requirements-dev.txt .
```
Next, run the setup script:
```sh
python setup.py build_ext -i
```
After installation is complete, you should be able to run pytest:
```sh
pytest
```
You will need to this way if you want to *contribute* to **ManimPango**.
### Contributing with Windows
*If you are a normal user, don't read this, you have wheels which you can just install directly using pip.*
If you want to contribute to **ManimPango** and you are on Windows, this section is for you.
As Windows does not include a C compiler by default, you will first need to install one. You have two choices:
1. MinGW/Msys2
2. Visual Studio
#### MinGW/Msys2
1. Download **MSYS2** from the download link provided on their page https://www.msys2.org/#installation and install it according to their instructions.
2. Once you have **MSYS2** installed, it offers you three different shells: the **MinGW32** shell, the **MinGW64** shell and **MSYS** shell. In order for the following steps to work, you have to open the **MSYS2 MinGW64** shell (you can search for this). Small hint: it has a blue color logo.
3. Run the following commands to install Python, Pango, Cython, Numpy, Scipy, Pillow, Pycairo and ffmpeg
```sh
pacman -S mingw-w64-x86_64-python
pacman -S mingw-w64-x86_64-python-pip
pacman -S mingw-w64-x86_64-pango
pacman -S mingw-w64-x86_64-cython
pacman -S mingw-w64-x86_64-python-numpy
pacman -S mingw-w64-x86_64-python-scipy
pacman -S mingw-w64-x86_64-python-pillow
pacman -S mingw-w64-x86_64-python-cairo
pacman -S mingw-w64-x86_64-ffmpeg
```
4. Still in the same shell, install **Manim** using `pip install manim`.
5. Finally, get your clone of **ManimPango**, `cd` into that directory and then run `pip install -e .`.
**Note** You can't use it with your regular Python version. It will cause weird errors if you do so. For working with **ManimPango**, you must be inside the `MSYS2 MINGW64 shell`.
6. You can then use `manim` inside that shell, to run **Manim**.
**Hint**: If you want to try out Python interactively, you can open `idle` using the command `python -m idlelib` inside that shell.
#### Visual Studio
First, install Visual Studio as specified in https://wiki.python.org/moin/WindowsCompilers. Possibly Visual Studio Build Tools 2022 with Windows10 SDK.
Then run the script at `packing/download_dlls.py`. This will get a **Pango** build along with `pkg-config` and install it at `C:\cibw\vendor`. Add `C:\cibw\vendor\bin` to PATH.
**Note:** You can change the install location by editing line 24 of the file `packing/download_dlls.py`.
Then set an environment variable `PKG_CONFIG_PATH`=`C:\cibw\vendor\lib\pkgconfig`.
Then you can install Cython using
```sh
pip install Cython
```
Finally, you can install your local **ManimPango** clone just like any other python package by typing:
```sh
pip install .
```
## Code of Conduct
Our full code of conduct, and how we enforce it, can be read on [our website](https://docs.manim.community/en/latest/conduct.html).
## License
This project is licensed under MIT License. The wheels distributed on PyPI contains compiled version of Pango and Cairo subject to terms of the GNU LGPL and other licenses. Consult the licenses of each library for more informations.
ManimPango-0.6.0/docs/ 0000775 0000000 0000000 00000000000 14671313014 0014473 5 ustar 00root root 0000000 0000000 ManimPango-0.6.0/docs/Makefile 0000664 0000000 0000000 00000001172 14671313014 0016134 0 ustar 00root root 0000000 0000000 # Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
ManimPango-0.6.0/docs/RELEASE.rst 0000664 0000000 0000000 00000004335 14671313014 0016312 0 ustar 00root root 0000000 0000000 Release Procedure
=================
This is the **maintainer** note on how to Release.
All versioning is in accordance to
`Semantic Versioning 2.0.0 `_.
This means older version would have a backport of bugs fixes.
1. Check whether the test suite passes on the main branch.
2. Revert any changes which seems to be not working, and check
for the milestone if PR are merged accordingly.
3. Check whether the `Wheels Build`_,
against the main branch works as expected.
4. Clone the repository locally.
5. Bump the version in `manimpango/_version`_ accordingly.
6. Make a commit with the changes done, as ``Release v``
7. Create a tag, locally with
.. code-block:: sh
git tag -s v
.. note::
Here, ``-s`` is used to sign the tag with gpg so that users
can later verify it, and a tag shouldn't be created with
signing because Github shows it unverified.
.. important::
The message should include the changelog of the release.
There is a github actions which will creates a draft `release`_
with the changelog. You can edit them and copy it to the tag you
create.
8. Push the tag to remote.
9. Go to `Github`_, and `draft a new release`_ with the same tag pushed.
You can copy the same changelog you copied when you created the tag.
.. important::
You should actually "draft a new release" instead of just publishing
a previously present draft release created by the Github Action. This is
important so that the wheels build workflow triggers.
10. Check whether the CI uploads the wheels and the ``.tar.gz`` file to
PyPi.
11. Finally, test the ``.tar.gz`` which was uploaded to `PyPi`_, and install
it in a new virtual environment.
.. _Wheels Build: https://github.com/ManimCommunity/ManimPango/actions?query=workflow%3A%22Build+Wheels%22
.. _manimpango/_version: https://github.com/ManimCommunity/ManimPango/blob/main/manimpango/_version.py
.. _Github: https://github.com
.. _draft a new release: https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/managing-releases-in-a-repository#creating-a-release
.. _PyPi: https://pypi.org/project/manimpango/
.. _release: https://github.com/ManimCommunity/ManimPango/releases
ManimPango-0.6.0/docs/_static/ 0000775 0000000 0000000 00000000000 14671313014 0016121 5 ustar 00root root 0000000 0000000 ManimPango-0.6.0/docs/_static/favicon.ico 0000664 0000000 0000000 00000035356 14671313014 0020256 0 ustar 00root root 0000000 0000000 00 Ј% 6 Ј о% h 6 ( 0 ` $ џџџ
џџџLџџџЇџџџцџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџэџџџДџџџ[џџџ џџџ/џџџІџџџёџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџіџџџИџџџ@џџџ џџџOџџџмџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџщџџџhџџџ џџџLџџџчџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџѓџџџhџџџ џџџ)џџџжџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџщџџџA џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЗџџџџџџ:џџџшџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџіџџџ[џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџГџџџЪџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџьџџџэџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ§§§џ§§§џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ§џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџіїѕџлсеџУЯЗџЗЦЉџЗХЈџТЮЖџйрвџєіѓџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџўўўџнуиџЎПџВџБџБџБџБџВџЌНџкргџ§§§џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџўўўџвкЪџДџБџВџВџВџВџВџВџБџГџЮзФџ§§§џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџпфйџЕџВџВџВџВџВџВџВџВџВџВџГџкргџџџџџ§§ўџњњћџњњћџњњћџњњћџњњћџњњћџњњћџњњћџњњћџњњћџњњћџњњћџќќ§џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџїјіџАРџБџВџВџВџВџВџВџВџВџВџВџБџЌНџіїєџцщѓџЂоџрџпџпџпџпџпџпџпџпџрџоџвиьџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџпфйџГ џВџВџВџВџВџВџВџВџВџВџВџВџВџкргџћћ§џІсџ[vпџ\xрџ\xрџ\xрџ\xрџ\xрџ\xрџ\xрџ]xрџ[wрџ~оџю№їџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџШвНџБџВџВџВџВџВџВџВџВџВџВџВџВџБџТЮЖџџџџџоуђџpпџ^yсџ_zсџ_zсџ_zсџ_zсџ_zрџ_zрџ^zсџd}оџЦЭыџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџНЪАџБџВџВџВџВџВџВџВџВџВџВџВџВџБџГРЃџэыыџюьыџЉдџ_tбџ_uвџ_uвџ_vгџ_yоџ_zсџ_zрџ]xрџЂсџјјћџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџОЪАџБџВџВџВџВџВџВџВџВџВџВџВџВџГџtџ|daџ}dbџu^_џeP^џeP_џeP^џdSiџ`rШџ_zтџ^yрџkоџзм№џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЩгПџБџГџГџГџГџГџГџГџГџГџВџВџВџДџdџdECџdFCџeFCџfGCџfGCџfGBџfKOџ`pУџ_{тџ^yпџЄБфџ§§§џџџџџџџџџџџџџџџџџџџџџџџџџЫЫЫџџџџџџкккџџџџџџџџџџџџџзззџЧЧЧџџџџџџџџџсцмџЌџmz_џcnWџdpXџdpXџdoXџdpXџdoXџbmWџo}`џ~џГџВџЏџugVџeFDџfHEџfHEџfHEџfHEџfHDџeLQџ`pУџ]yтџvоџцщєџџџџџџџџџџџџџџџџџџџџџџџџџџџџџдддџџGGGџ000џYYYџџрррџџџџџџџџџњњњџxxxџ[[[џяяяџџџџџљљјџЎНџqaџQXJџ@B=џht[џo|`џalVџ<>:џV^NџueџЎџВџДџqџiOIџfGEџfHEџfHEџfHEџfHEџfHDџeLQџ`pУџ`{рџИТшџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЅЅЅџHHHџжжжџџџџџџџџџџџџџџџџџеееџ___џ^^^џЙЙЙџџџџџџџџџтчнџЃИџЈzџRYKџoџИџp~aџZcQџЏџДџВџГџЉ|џteUџeGDџfHEџfHEџfHEџfHEџfHEџfHDџeLQџ^oУџсџёѓјџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџСССџ\\\џюююџџџџџџџџџџџџџџџџџџџАААџzzzџљљљџџџџџџџџџзоаџ ЕџYbPџziџЖџfrZџgt[џДџГџДџЉ|џyo[џfHEџfHEџfHEџfHEџfHEџfHEџfHEџfHDџeKQџguРџЪвюџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџТТТџ\\\џюююџџџџџџџџџџџџџшшшџfffџгггџыыыџfffџбббџџџџџџџџџџўџџрхмџhmcџziџДџerYџhu[џЕџ~џpџtdUџfHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџfHDџdJPџФџљњ§џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџСССџ\\\џюююџџџџџџџџџџџџџЏЏЏџyyyџћћћџаааџDDDџџџџџџџџџџџџџџ§§§џ}}}џЅЉЁџЮиФџyrџ[\Mџ{bџtdUџiMHџeGDџfHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџfGDџlQPџдадџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџСССџ\\\џюююџџџџџџџџџіііџsssџЙЙЙџџџџџџaaaџZZZџцццџџџџџџџџџ§§§џ}}}џОООџџџџџџK;:џfGDџeFDџfGEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџeGDџoTQџпкйџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџСССџ\\\џюююџџџџџџџџџЩЩЩџjjjџ№№№џоооџhhhџЮЮЮџ```џЊЊЊџџџџџџџџџ§§§џ}}}џОООџџџџџџK<:џgHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџeGDџoTQџокйџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџСССџ\\\џюююџџџџџўўўџџџџџџџџџџџџџџhhhџєєєџџџџџ§§§џ}}}џОООџџџџџџK<:џgHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџeGDџoTQџокйџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџСССџ\\\џюююџџџџџрррџfffџоооџяяяџkkkџЬЬЬџџџџџмммџTTTџХХХџџџџџ§§§џ}}}џОООџџџџџџK<:џgHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџeGDџoTQџокйџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџСССџ\\\џюююџџџџџЂЂЂџ џџџџџИИИџwwwџїїїџџџџџ§§§џџџ§§§џ§§§џ}}}џОООџџџџџџK<:џgHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџfHEџeGDџoTQџокйџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџСССџ\\\џяяяџёёёџmmmџЧЧЧџћћћџyyyџДДДџџџџџџџџџџџџџЧЧЧџTTTџмммџџџџџ}}}џОООџџџџџџK;:џfGDџeGDџeGDџeGDџeGDџeGDџeGDџeGDџeGDџeGDџeGDџeGDџdFCџnSPџоййџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџСССџ\\\џёёёџОООџrrrџїїїџаааџjjjџыыыџџџџџџџџџџџџџѕѕѕџjjjџџўўўџ}}}џОООџџџџџџRDCџtZWџsYWџsYWџsYWџsYWџsYWџsYWџsYWџsYWџsYWџsYWџsYWџsXVџ|dbџсннџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџСССџ]]]џъъъџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ^^^џъъъџ~~~џОООџџџџџџџшффџцттџцттџцттџцттџцттџцттџцттџцттџцттџцттџцттџхттџчффџњњњџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџСССџ^^^џХХХџiiiџшшшџхххџhhhџкккџџџџџџџџџџџџџџџџџџџџџшшшџZZZџГГГџџОООџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџТТТџ]]]џ џџџџџџЈЈЈџџќќќџџџџџџџџџџџџџџџџџџџџџџџџџџoooџvvvџОООџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџУУУџHHHџZZZџжжжџєєєџpppџФФФџџџџџџџџџџџџџџџџџџџџџџџџџџџџџеееџQQQџPPPџРРРџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџћџџџџјјјџщщщџІІІџ444џuuuџщщщџЗЗЗџrrrџєєєџџџџџџџџџџџџџџџџџџџџџџџџџџџџџћћћџyyyџ444џВВВџ№№№џЏЏЏџ___џЫЫЫџђђђџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџщџџџџСССџhhhџVVVџKKKџ```џmmmџ___џДДДџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџФФФџRRRџaaaџmmmџhhhџNNNџWWWџџќќќџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџўџџџТџџџџєєєџтттџуууџфффџтттџсссџфффџљљљџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџћћћџчччџтттџсссџтттџуууџтттџьььџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџхџџџџџџўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЇџџџ.џџџрџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ№џџџLџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџІџџџ џџџџџџХџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџлџџџ0 џџџ7џџџзџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџчџџџO џџџ7џџџЦџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџзџџџL џџџџџџџџџсџџџўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџщџџџџџџ( џџџџџџ-џџџџџџУџџџщџџџћџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ§џџџэџџџЫџџџџџџ9џџџ ў ј № р Р Р р № ј џ ( @ џџџ/џџџџџџцџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџыџџџЄџџџ9џџџ џџџџџџXџџџлџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџуџџџhџџџ џџџVџџџэџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџєџџџi џџџ(џџџеџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџтџџџ9џџџџџџўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЄџџџеџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџъџџџіџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџіїєџъюцџъюцџѕїєџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџїјіџЭзУџЋНџ Жџ ЕџЊНџЫеРџіїєџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџїљіџЛЪџБџБџВџВџБџБџИЧЉџіїєџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЮиФџБџВџВџВџВџВџВџБџЬжРџёђљџДПшџЌЙшџЙшџЙшџЙшџЙшџЙшџАЛшџщьіџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџїјіџПџБџВџВџВџВџВџВџБџЊНџ№ђёџЇцџ[wрџ]xрџ]xрџ]xрџ]xпџ[vпџсџђєњџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџэ№ъџЂЗџВџВџВџВџВџВџВџВџЕџпрзџЮатџj}аџ_tбџ_uвџ_yоџ^zсџfпџЭд№џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюёъџЂЗџДџДџДџДџДџДџВџГџЋ~џndџy`^џiS\џeO[џdShџ`sЫџ]yсџЈхџњћ§џџџџџџџџџџџџџцццџГГГџБББџАААџиииџџџџџџџџџлллџѓѓѓџљњјџЊЛџygџtdџvfџvfџsdџ{jџЎџДџuџiNHџdFCџfGCџfGBџeLQџ_qЧџnсџоуєџџџџџџџџџџџџџџџџџыыыџџFFFџџнннџџџџџ№№№џlllџЗЗЗџџџџџЭжХџyiџQXJџqbџkx]џRYKџ|jџЏџВџ}x`џfGDџfHEџfHEџfHDџeLSџ_qЦџЌЙъџџџўџџџџџџџџџџџџџџџџџџџџџёёёџ{{{џчччџџџџџџџџџПППџџџїїїџљњјџСЯВџp}bџ pџzhџvfџЗџВџjџiNHџfGDџfHEџfHEџfHDџdKRџ|ЧџыяљџџџџџџџџџџџџџџџџџџџџџџџџџѓѓѓџџъъъџџџџџљљљџџлллџџЭЭЭџџџџџњћљџџџ~pџtcџuџ}v_џiNHџfGDџfHEџfHEџfHEџfGDџhNRџРРгџџџџџџџџџџџџџџџџџџџџџџџџџџџџџѓѓѓџџъъъџџџџџдддџџрррџgggџџџџџџџџџџЊЊЊџЩЪШџЏБџZKEџjOIџeGDџfGEџfHEџfHEџfHEџfHEџeGDџqVTџупоџџџџџџџџџџџџџџџџџџџџџџџџџџџџџѓѓѓџџъъъџџџџџ џЬЬЬџЏЏЏџЏЏЏџџтттџџџџџЊЊЊџбббџКЙЙџUA@џfHEџfHEџfHEџfHEџfHEџfHEџfHEџeGDџrWTџфрпџџџџџџџџџџџџџџџџџџџџџџџџџџџџџѓѓѓџџыыыџшшшџџфффџџёёёџЅЅЅџЈЈЈџџџџџЊЊЊџбббџЙЙЙџVB@џgHEџfHEџfHEџfHEџfHEџfHEџfHEџeGDџrWTџфппџџџџџџџџџџџџџџџџџџџџџџџџџџџџџѓѓѓџџьььџЕЕЕџИИИџТТТџЌЌЌџџџџџпппџ~~~џєєєџЋЋЋџбббџЙЙЙџUA?џfGDџeGDџeGDџeGDџeGDџeGDџeGDџdFCџqUSџфппџџџџџџџџџџџџџџџџџџџџџџџџџџџџџѓѓѓџџпппџџсссџџрррџџџџџўўўџџТТТџџбббџКЙЙџ_NLџv[XџuZXџuZXџuZXџuZXџuZXџuZXџtZWџheџцутџџџџџџџџџџџџџџџџџџџџџџџџџџџџџѓѓѓџџДДДџІІІџдддџџўўўџџџџџџџџџЪЪЪџџЅЅЅџбббџКККџЊЇЇџышчџшхфџшхфџшхфџшхфџшхфџшхфџшхфџъччџћћћџџџџџџџџџџџџџџџџџџџџџџџџџџџџџєєєџ~~~џџзззџЃЃЃџЭЭЭџџџџџџџџџџџџџіііџ џџгггџКККџЙЙЙџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџђђђџeeeџџрррџџіііџџџџџџџџџџџџџџџџџЖЖЖџNNNџбббџРРРџЈЈЈџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџєсссџџXXXџ}}}џџОООџџџџџџџџџџџџџџџџџџџџџьььџlllџџџgggџЌЌЌџћћћџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЯїїїџтттџфффџуууџфффџњњњџџџџџџџџџџџџџџџџџџџџџџџџџэээџтттџтттџуууџщщщџўўўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџхџџџџџџ§џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ џџџЫџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџкџџџ/ џџџGџџџхџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџэџџџY џџџGџџџЬџџџ§џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџўџџџжџџџUџџџ џџџџџџџџџаџџџєџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџіџџџеџџџџџџ( № р Р Р р ј ( џџџџџџiџџџсџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџхџџџqџџџџџџeџџџ№џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџѓџџџqџџџйџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџуџџџќџџџџџџџџџџџџџџџџџџџџь№шџЬзРџЫзПџыячџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџэ№щџЉНџБџБџЈМџцъхџзоіџаиєџазѓџдлєџіјќџџџџџџџџџџџџџџџџџџџџџЭиТџВџДџГџВџПЪДџжџavаџ`zнџЃцџїјќџіііџеееџсссџћћћџё№ёџЫжСџrџrџtџБџlџoVZџcRgџi{ЮџеміџџџџџјјјџЂЂЂџЮЮЮџфффџЈЈЉџуцпџ~џp~`џ{jџvџoZOџeEBџdKSџЁЈгџ§§џџџџџџџџџџХХХџшшшџЫЫЫџЄЄЄџгггџбдЯџ џvs^џo[OџfGEџeGDџpVVџомсџџџџџџџџџџџџџЦЦЦџиииџМММџЗЗЗџЙЙЙџзззџЖЕЕџeMKџdEBџeFCџdEBџtYVџщхфџџџџџџџџџџџџџЦЦЦџНННџЙЙЙџсссџЦЦЦџНННџИЗЗџs_]џw\Yџv\Yџv[XџljџышчџџџџџџџџџџџџџНННџЈЈЈџРРРџњњњџшшшџџНММџЮЫЫџэщщџыччџыччџэъщџќќќџџџџџџџџџїїїќ џџзззџџџџџўўўџЈЈЈџЃЃЃџОООџўўўџџџџџџџџџџџџџџџџџџџџџџџџџљљљешшшџщщщџњњњџџџџџџџџџѕѕѕџчччџыыыџўўўџџџџџџџџџџџџџџџџџџџџџџџџрџџџ^џџџьџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ№џџџiџџџџџџ^џџџжџџџ§џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ§џџџкџџџeџџџР Р ManimPango-0.6.0/docs/_templates/ 0000775 0000000 0000000 00000000000 14671313014 0016630 5 ustar 00root root 0000000 0000000 ManimPango-0.6.0/docs/_templates/autosummary/ 0000775 0000000 0000000 00000000000 14671313014 0021216 5 ustar 00root root 0000000 0000000 ManimPango-0.6.0/docs/_templates/autosummary/class.rst 0000664 0000000 0000000 00000000652 14671313014 0023060 0 ustar 00root root 0000000 0000000 {{ fullname | escape | underline}}
.. currentmodule:: {{ module }}
.. autoclass:: {{ objname }}
:show-inheritance:
:members:
{% block methods %}
{%- if methods %}
.. rubric:: {{ _('Methods') }}
.. autosummary::
:nosignatures:
{% for item in methods if item != '__init__' and item not in inherited_members %}
~{{ name }}.{{ item }}
{%- endfor %}
{%- endif %}
{%- endblock %}
ManimPango-0.6.0/docs/_templates/autosummary/module.rst 0000664 0000000 0000000 00000001657 14671313014 0023246 0 ustar 00root root 0000000 0000000 {{ fullname | escape | underline }}
.. currentmodule:: {{ fullname }}
.. automodule:: {{ fullname }}
{% block attributes %}
{% if attributes %}
.. rubric:: Module Attributes
.. autosummary::
{% for item in attributes %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
{% block classes %}
{% if classes %}
.. rubric:: Classes
.. autosummary::
:toctree: .
:nosignatures:
{% for class in classes %}
{{ class }}
{% endfor %}
{% endif %}
{% endblock %}
{% block functions %}
{% if functions %}
.. rubric:: {{ _('Functions') }}
{% for item in functions %}
.. autofunction:: {{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
{% block exceptions %}
{% if exceptions %}
.. rubric:: {{ _('Exceptions') }}
.. autosummary::
{% for item in exceptions %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
ManimPango-0.6.0/docs/conf.py 0000664 0000000 0000000 00000005470 14671313014 0016000 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath(".."))
from pathlib import Path
# -- Project information -----------------------------------------------------
from pkg_resources import get_distribution
project = "ManimPango"
copyright = "2021, The Manim Community Dev Team"
author = "The Manim Community Dev Team"
release = get_distribution("ManimPango").version
version = ".".join(release.split(".")[:2])
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.autosummary",
"sphinx.ext.doctest",
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
"sphinxext.opengraph",
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "furo"
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
html_favicon = str(Path("_static/favicon.ico"))
autosummary_generate = True
# generate documentation from type hints
autodoc_typehints = "description"
autoclass_content = "both"
# controls whether functions documented by the autofunction directive
# appear with their full module names
add_module_names = False
intersphinx_mapping = {
"manim": ("https://docs.manim.community/en/v0.2.0", None),
"python": ("https://docs.python.org/3", None),
}
ogp_image = "https://www.manim.community/logo.png"
ogp_site_name = "Manim Pango | Documentation"
ogp_site_url = "https://manimpango.manim.community/"
ManimPango-0.6.0/docs/index.rst 0000664 0000000 0000000 00000000342 14671313014 0016333 0 ustar 00root root 0000000 0000000 ManimPango's documentation!
===========================
.. toctree::
:maxdepth: 2
:caption: Contents:
reference
RELEASE
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
ManimPango-0.6.0/docs/make.bat 0000664 0000000 0000000 00000001370 14671313014 0016101 0 ustar 00root root 0000000 0000000 @ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
if "%1" == "" goto help
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end
popd
ManimPango-0.6.0/docs/reference.rst 0000664 0000000 0000000 00000000700 14671313014 0017160 0 ustar 00root root 0000000 0000000 Manimpango Reference
====================
.. autosummary::
:toctree: reference
manimpango.TextSetting
manimpango.PangoUtils
manimpango.text2svg
manimpango.MarkupUtils
manimpango.register_font
manimpango.unregister_font
manimpango.fc_register_font
manimpango.fc_unregister_font
manimpango.list_fonts
Enums
=====
.. autosummary::
:toctree: reference
manimpango.Style
manimpango.Weight
manimpango.Variant
ManimPango-0.6.0/docs/requirements.txt 0000664 0000000 0000000 00000000255 14671313014 0017761 0 ustar 00root root 0000000 0000000 furo
sphinx
sphinxcontrib-applehelp
sphinxcontrib-devhelp
sphinxcontrib-htmlhelp
sphinxcontrib-jsmath
sphinxcontrib-qthelp
sphinxcontrib-serializinghtml
sphinxext-opengraph
ManimPango-0.6.0/environment.yml 0000664 0000000 0000000 00000003410 14671313014 0016630 0 ustar 00root root 0000000 0000000 name: manimpango
channels:
- defaults
dependencies:
- _libgcc_mutex=0.1=main
- ca-certificates=2020.12.8=h06a4308_0
- cairo=1.14.12=h8948797_3
- certifi=2020.12.5=py37h06a4308_0
- fontconfig=2.13.0=h9420a91_0
- freetype=2.10.4=h5ab3b9f_0
- fribidi=1.0.10=h7b6447c_0
- glib=2.66.1=h92f7085_0
- graphite2=1.3.14=h23475e2_0
- harfbuzz=2.4.0=hca77d97_1
- icu=58.2=he6710b0_3
- ld_impl_linux-64=2.33.1=h53a641e_7
- libedit=3.1.20191231=h14c3975_1
- libffi=3.3=he6710b0_2
- libgcc-ng=9.1.0=hdf63c60_0
- libpng=1.6.37=hbc83047_0
- libstdcxx-ng=9.1.0=hdf63c60_0
- libuuid=1.0.3=h1bed415_2
- libxcb=1.14=h7b6447c_0
- libxml2=2.9.10=hb55368b_3
- ncurses=6.2=he6710b0_1
- openssl=1.1.1i=h27cfd23_0
- pango=1.45.3=hd140c19_0
- pcre=8.44=he6710b0_0
- pip=20.3.3=py37h06a4308_0
- pixman=0.40.0=h7b6447c_0
- pkg-config=0.29.2=h1bed415_8
- python=3.8
- readline=8.0=h7b6447c_0
- setuptools=51.0.0=py37h06a4308_2
- sqlite=3.33.0=h62c20be_0
- tk=8.6.10=hbc83047_0
- wheel=0.36.2=pyhd3eb1b0_0
- xz=5.2.5=h7b6447c_0
- zlib=1.2.11=h7b6447c_3
- pip:
- alabaster==0.7.12
- babel==2.9.0
- beautifulsoup4==4.9.3
- chardet==4.0.0
- cython==0.29.21
- docutils==0.16
- furo==2021.3.20b30
- idna==2.10
- imagesize==1.2.0
- jinja2==2.11.2
- markupsafe==1.1.1
- packaging==20.8
- pygments==2.7.3
- pyparsing==2.4.7
- pytz==2020.5
- requests==2.25.1
- snowballstemmer==2.0.0
- soupsieve==2.1
- sphinx==3.4.1
- sphinxcontrib-applehelp==1.0.2
- sphinxcontrib-devhelp==1.0.2
- sphinxcontrib-htmlhelp==1.0.3
- sphinxcontrib-jsmath==1.0.1
- sphinxcontrib-qthelp==1.0.3
- sphinxcontrib-serializinghtml==1.1.4
- sphinxext-opengraph==0.3.1
- urllib3==1.26.2
ManimPango-0.6.0/manimpango/ 0000775 0000000 0000000 00000000000 14671313014 0015671 5 ustar 00root root 0000000 0000000 ManimPango-0.6.0/manimpango/__init__.py 0000664 0000000 0000000 00000002111 14671313014 0017775 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
import os
import sys
from ._version import __version__ # noqa: F403,F401
if os.name == "nt": # pragma: no cover
os.environ["PATH"] = (
f"{os.path.abspath(os.path.dirname(__file__))}"
f"{os.pathsep}"
f"{os.environ['PATH']}"
)
try:
from .register_font import * # isort:skip # noqa: F403,F401
from .cmanimpango import * # noqa: F403,F401
from .enums import * # noqa: F403,F401
except ImportError as ie: # pragma: no cover
py_ver = ".".join(map(str, sys.version_info[:3]))
msg = f"""
ManimPango could not import and load the necessary shared libraries.
This error may occur when ManimPango and its dependencies are improperly set up.
Please make sure the following versions are what you expect:
* ManimPango v{__version__}, Python v{py_ver}
If you believe there is a greater problem,
feel free to contact us or create an issue on GitHub:
* Discord: https://www.manim.community/discord/
* GitHub: https://github.com/ManimCommunity/ManimPango/issues
Original error: {ie}
"""
raise ImportError(msg)
ManimPango-0.6.0/manimpango/_register_font.pxd 0000664 0000000 0000000 00000003754 14671313014 0021430 0 ustar 00root root 0000000 0000000 from libc.stddef cimport wchar_t
from pango cimport *
cdef extern from "Python.h":
wchar_t* PyUnicode_AsWideCharString(
object unicode,
Py_ssize_t* size
)
cdef extern from "fontconfig/fontconfig.h":
ctypedef int FcBool
ctypedef struct FcConfig:
pass
FcBool FcConfigAppFontAddFile(
FcConfig* config,
const unsigned char* file_name
)
FcConfig* FcConfigGetCurrent()
void FcConfigAppFontClear(void *)
# Windows and macOS specific API's
IF UNAME_SYSNAME == "Windows":
cdef extern from "windows.h":
ctypedef const wchar_t* LPCWSTR
ctypedef enum DWORD:
FR_PRIVATE
int AddFontResourceExW(
LPCWSTR name,
DWORD fl,
unsigned int res
)
bint RemoveFontResourceExW(
LPCWSTR name,
DWORD fl,
unsigned int pdv
)
ctypedef void* HANDLE
HANDLE CreateMutexA(void* lpMutexAttributes, int bInitialOwner, const char* lpName)
int ReleaseMutex(HANDLE hMutex)
int WaitForSingleObject(HANDLE hHandle, unsigned long dwMilliseconds)
int CloseHandle(HANDLE hObject)
ELIF UNAME_SYSNAME == "Darwin":
cdef extern from "Carbon/Carbon.h":
ctypedef struct CFURLRef:
pass
ctypedef enum CTFontManagerScope:
kCTFontManagerScopeProcess
ctypedef unsigned int UInt8
ctypedef long CFIndex
ctypedef unsigned int UInt32
ctypedef UInt32 CFStringEncoding
CFURLRef CFURLCreateWithBytes(
void*,
unsigned char *URLBytes,
CFIndex length,
CFStringEncoding encoding,
void*
)
bint CTFontManagerRegisterFontsForURL(
CFURLRef fontURL,
CTFontManagerScope scope,
void* error
)
bint CTFontManagerUnregisterFontsForURL(
CFURLRef fontURL,
CTFontManagerScope scope,
void* error
)
ManimPango-0.6.0/manimpango/_register_font.pyx 0000664 0000000 0000000 00000012017 14671313014 0021445 0 ustar 00root root 0000000 0000000 from pathlib import Path
from pango cimport *
import os
from dataclasses import dataclass
include "utils.pxi"
@dataclass(frozen=True)
class RegisteredFont:
"""A class to represent a font file.
Attributes
----------
path : :class:`str`
The path to the font file.
"""
path: str
type: "fontconfig" | "win32" | "macos"
cpdef bint _fc_register_font(set registered_fonts, str font_path):
a = Path(font_path)
assert a.exists(), f"font doesn't exist at {a.absolute()}"
font_path = os.fspath(a.absolute())
font_path_bytes = font_path.encode('utf-8')
cdef const unsigned char* fontPath = font_path_bytes
fontAddStatus = FcConfigAppFontAddFile(FcConfigGetCurrent(), fontPath)
if fontAddStatus:
registered_fonts.add(RegisteredFont(font_path, "fontconfig"))
return True
else:
return False
cpdef bint _fc_unregister_font(set registered_fonts, str font_path):
FcConfigAppFontClear(NULL)
# remove all type "fontconfig" files
copy = registered_fonts.copy()
for font in copy:
if font.type == 'fontconfig':
registered_fonts.remove(font)
return True
IF UNAME_SYSNAME == "Linux":
_register_font = _fc_register_font
_unregister_font = _fc_unregister_font
ELIF UNAME_SYSNAME == "Windows":
cpdef bint _register_font(set registered_fonts, str font_path):
a = Path(font_path)
assert a.exists(), f"font doesn't exist at {a.absolute()}"
font_path = os.fspath(a.absolute())
cdef LPCWSTR wchar_path = PyUnicode_AsWideCharString(font_path, NULL)
fontAddStatus = AddFontResourceExW(
wchar_path,
FR_PRIVATE,
0
)
if fontAddStatus > 0:
registered_fonts.add(RegisteredFont(font_path, "win32"))
return True
else:
return False
cpdef bint _unregister_font(set registered_fonts, str font_path):
a = Path(font_path)
assert a.exists(), f"font doesn't exist at {a.absolute()}"
font_path = os.fspath(a.absolute())
font = RegisteredFont(font_path, "win32")
if font in registered_fonts:
registered_fonts.remove(font)
cdef LPCWSTR wchar_path = PyUnicode_AsWideCharString(font_path, NULL)
return RemoveFontResourceExW(
wchar_path,
FR_PRIVATE,
0
)
ELIF UNAME_SYSNAME == "Darwin":
cpdef bint _register_font(set registered_fonts, str font_path):
a = Path(font_path)
assert a.exists(), f"font doesn't exist at {a.absolute()}"
font_path_bytes_py = str(a.absolute().as_uri()).encode('utf-8')
cdef unsigned char* font_path_bytes = font_path_bytes_py
b = len(a.absolute().as_uri())
cdef CFURLRef cf_url = CFURLCreateWithBytes(NULL, font_path_bytes, b, 0x08000100, NULL)
res = CTFontManagerRegisterFontsForURL(
cf_url,
kCTFontManagerScopeProcess,
NULL
)
if res:
registered_fonts.add(RegisteredFont(os.fspath(a.absolute()), "macos"))
return True
else:
return False
cpdef bint _unregister_font(set registered_fonts, str font_path):
a = Path(font_path)
assert a.exists(), f"font doesn't exist at {a.absolute()}"
font_path_bytes_py = str(a.absolute().as_uri()).encode('utf-8')
cdef unsigned char* font_path_bytes = font_path_bytes_py
b = len(a.absolute().as_uri())
cdef CFURLRef cf_url = CFURLCreateWithBytes(NULL, font_path_bytes, b, 0x08000100, NULL)
res = CTFontManagerUnregisterFontsForURL(
cf_url,
kCTFontManagerScopeProcess,
NULL
)
if res:
font = RegisteredFont(os.fspath(a.absolute()), "macos")
if font in registered_fonts:
registered_fonts.remove(font)
return True
else:
return False
cpdef list _list_fonts(tuple registered_fonts):
cdef PangoFontMap* fontmap = pango_cairo_font_map_new()
if fontmap == NULL:
raise MemoryError("Pango.FontMap can't be created.")
for font in registered_fonts:
if font.type == 'win32':
add_to_fontmap(fontmap, font.path)
cdef int n_families=0
cdef PangoFontFamily** families=NULL
pango_font_map_list_families(
fontmap,
&families,
&n_families
)
if families is NULL or n_families == 0:
raise MemoryError("Pango returned unexpected length on families.")
family_list = []
for i in range(n_families):
name = pango_font_family_get_name(families[i])
# according to pango's docs, the `char *` returned from
# `pango_font_family_get_name`is owned by pango, and python
# shouldn't interfere with it. I hope Cython handles it.
# https://cython.readthedocs.io/en/stable/src/tutorial/strings.html#dealing-with-const
family_list.append(name.decode())
g_free(families)
g_object_unref(fontmap)
family_list.sort()
return family_list
ManimPango-0.6.0/manimpango/_version.py 0000664 0000000 0000000 00000000056 14671313014 0020070 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
__version__ = "0.6.0"
ManimPango-0.6.0/manimpango/cairo.pxd 0000664 0000000 0000000 00000001403 14671313014 0017501 0 ustar 00root root 0000000 0000000 cdef extern from "cairo.h":
ctypedef struct cairo_surface_t:
pass
ctypedef struct cairo_t:
pass
ctypedef enum cairo_status_t:
CAIRO_STATUS_SUCCESS
CAIRO_STATUS_NO_MEMORY
cairo_t* cairo_create(cairo_surface_t* target)
void cairo_move_to(
cairo_t* cr,
double x,
double y
)
void cairo_destroy(cairo_t* cr)
void cairo_surface_destroy(cairo_surface_t* surface)
cairo_status_t cairo_status(cairo_t *cr)
const char* cairo_status_to_string(cairo_status_t status)
const char* cairo_version_string()
cdef extern from "cairo-svg.h":
cairo_surface_t* cairo_svg_surface_create(
const char* filename,
double width_in_points,
double height_in_points
)
ManimPango-0.6.0/manimpango/cmanimpango.pxd 0000664 0000000 0000000 00000000076 14671313014 0020702 0 ustar 00root root 0000000 0000000 from cairo cimport *
from glib cimport *
from pango cimport *
ManimPango-0.6.0/manimpango/cmanimpango.pyx 0000664 0000000 0000000 00000025446 14671313014 0020737 0 ustar 00root root 0000000 0000000 import typing
import warnings
from xml.sax.saxutils import escape
from . import registered_fonts
from .enums import Alignment
from .utils import *
include "utils.pxi"
class TextSetting:
"""Formatting for slices of a :class:`manim.mobject.svg.text_mobject.Text` object."""
def __init__(
self,
start: int,
end: int,
font: str,
slant: str,
weight: str,
line_num = -1,
color: str = None,
):
self.start = start
self.end = end
self.font = font
self.slant = slant
self.weight = weight
self.line_num = line_num
self.color = color
def text2svg(
settings: list,
size: float,
line_spacing: float,
disable_liga: bool,
file_name: str,
START_X: int,
START_Y: int,
width: int,
height: int,
orig_text: str,
pango_width: typing.Union[int, None] = None,
) -> str:
"""Render an SVG file from a :class:`manim.mobject.svg.text_mobject.Text` object."""
cdef cairo_surface_t* surface
cdef cairo_t* cr
cdef PangoFontDescription* font_desc
cdef PangoLayout* layout
cdef double font_size_c = size
cdef cairo_status_t status
cdef int temp_width
cdef PangoFontMap* fontmap
file_name_bytes = file_name.encode("utf-8")
surface = cairo_svg_surface_create(file_name_bytes,width,height)
if surface == NULL:
raise MemoryError("Cairo.SVGSurface can't be created.")
cr = cairo_create(surface)
status = cairo_status(cr)
if cr == NULL or status == CAIRO_STATUS_NO_MEMORY:
cairo_destroy(cr)
cairo_surface_destroy(surface)
raise MemoryError("Cairo.Context can't be created.")
elif status != CAIRO_STATUS_SUCCESS:
cairo_destroy(cr)
cairo_surface_destroy(surface)
raise Exception(cairo_status_to_string(status))
cairo_move_to(cr,START_X,START_Y)
offset_x = 0
last_line_num = 0
layout = pango_cairo_create_layout(cr)
fontmap = pango_context_get_font_map (pango_layout_get_context (layout));
for font_item in registered_fonts:
if font_item.type == 'win32':
add_to_fontmap(fontmap, font_item.path)
if layout == NULL:
cairo_destroy(cr)
cairo_surface_destroy(surface)
raise MemoryError("Pango.Layout can't be created from Cairo Context.")
if pango_width is None:
pango_layout_set_width(layout, pango_units_from_double(width))
else:
pango_layout_set_width(layout, pango_units_from_double(pango_width))
for setting in settings:
family = setting.font.encode('utf-8')
style = PangoUtils.str2style(setting.slant)
weight = PangoUtils.str2weight(setting.weight)
color = setting.color
text_str = orig_text[setting.start : setting.end].replace("\n", " ")
font_desc = pango_font_description_new()
if font_desc==NULL:
cairo_destroy(cr)
cairo_surface_destroy(surface)
g_object_unref(layout)
raise MemoryError("Pango.FontDesc can't be created.")
pango_font_description_set_size(font_desc, pango_units_from_double(font_size_c))
if family:
pango_font_description_set_family(font_desc, family)
pango_font_description_set_style(font_desc, style.value)
pango_font_description_set_weight(font_desc, weight.value)
pango_layout_set_font_description(layout, font_desc)
pango_font_description_free(font_desc)
if setting.line_num != last_line_num:
offset_x = 0
last_line_num = setting.line_num
cairo_move_to(cr,START_X + offset_x,START_Y + line_spacing * setting.line_num)
pango_cairo_update_layout(cr,layout)
markup = escape(text_str)
if color:
markup = (f"{markup}")
if MarkupUtils.validate(markup):
cairo_destroy(cr)
cairo_surface_destroy(surface)
g_object_unref(layout)
raise ValueError(f"Pango cannot recognize your color '{color}' for text '{text_str}'.")
if disable_liga:
markup = f"{markup}"
pango_layout_set_markup(layout, markup.encode('utf-8'), -1)
pango_cairo_show_layout(cr, layout)
pango_layout_get_size(layout,&temp_width,NULL)
offset_x += pango_units_to_double(temp_width)
status = cairo_status(cr)
if cr == NULL or status == CAIRO_STATUS_NO_MEMORY:
cairo_destroy(cr)
cairo_surface_destroy(surface)
g_object_unref(layout)
raise MemoryError("Cairo.Context can't be created.")
elif status != CAIRO_STATUS_SUCCESS:
cairo_destroy(cr)
cairo_surface_destroy(surface)
g_object_unref(layout)
raise Exception(cairo_status_to_string(status).decode())
cairo_destroy(cr)
cairo_surface_destroy(surface)
g_object_unref(layout)
return file_name
class MarkupUtils:
@staticmethod
def validate(markup: str) -> str:
"""Validates whether markup is a valid Markup
and return the error's if any.
Parameters
==========
markup : :class:`str`
The markup which should be checked.
Returns
=======
:class:`str`
Returns empty string if markup is valid. If markup
contains error it return the error message.
"""
cdef GError *err = NULL
text_bytes = markup.encode("utf-8")
res = pango_parse_markup(
text_bytes,
-1,
0,
NULL,
NULL,
NULL,
&err
)
if res:
return ""
else:
message = err.message
g_error_free(err)
return message.decode('utf-8')
@staticmethod
def text2svg(
text: str,
font: str | None,
slant: str,
weight: str,
size: float,
_, # for some there was a keyword here.
disable_liga: bool,
file_name: str,
START_X: int,
START_Y: int,
width: int,
height: int,
*, # keyword only arguments below
justify: bool | None = None,
indent: float | int | None = None,
line_spacing: float | None = None,
alignment: Alignment | None = None,
pango_width: int | None = None,
) -> str:
"""Render an SVG file from a :class:`manim.mobject.svg.text_mobject.MarkupText` object."""
cdef cairo_surface_t* surface
cdef cairo_t* context
cdef PangoFontDescription* font_desc
cdef PangoLayout* layout
cdef cairo_status_t status
cdef double font_size = size
cdef int temp_int # a temporary C integer for conversion
cdef PangoFontMap* fontmap
file_name_bytes = file_name.encode("utf-8")
if disable_liga:
text_bytes = f"{text}".encode("utf-8")
else:
text_bytes = text.encode("utf-8")
surface = cairo_svg_surface_create(file_name_bytes,width,height)
if surface == NULL:
raise MemoryError("Cairo.SVGSurface can't be created.")
context = cairo_create(surface)
status = cairo_status(context)
if context == NULL or status == CAIRO_STATUS_NO_MEMORY:
cairo_destroy(context)
cairo_surface_destroy(surface)
raise MemoryError("Cairo.Context can't be created.")
elif status != CAIRO_STATUS_SUCCESS:
cairo_destroy(context)
cairo_surface_destroy(surface)
raise Exception(cairo_status_to_string(status))
cairo_move_to(context,START_X,START_Y)
layout = pango_cairo_create_layout(context)
if layout == NULL:
cairo_destroy(context)
cairo_surface_destroy(surface)
raise MemoryError("Pango.Layout can't be created from Cairo Context.")
fontmap = pango_context_get_font_map (pango_layout_get_context (layout));
for font_item in registered_fonts:
if font_item.type == 'win32':
add_to_fontmap(fontmap, font_item.path)
if pango_width is None:
pango_layout_set_width(layout, pango_units_from_double(width))
else:
pango_layout_set_width(layout, pango_units_from_double(pango_width))
if justify:
pango_layout_set_justify(layout, justify)
if indent:
temp_int = pango_units_from_double(indent)
pango_layout_set_indent(layout, temp_int)
if line_spacing:
# Typical values are: 0, 1, 1.5, 2.
ret = set_line_width(layout, line_spacing)
if not ret:
# warn that line spacing don't work
# because of old Pango version they
# have
warnings.warn(
"Pango Version<1.44 found."
"Impossible to set line_spacing."
"Expect Ugly Output."
)
if alignment:
pango_layout_set_alignment(layout, alignment.value)
font_desc = pango_font_description_new()
if font_desc == NULL:
cairo_destroy(context)
cairo_surface_destroy(surface)
g_object_unref(layout)
raise MemoryError("Pango.FontDesc can't be created.")
pango_font_description_set_size(font_desc, pango_units_from_double(font_size))
if font is not None and len(font) != 0:
pango_font_description_set_family(font_desc, font.encode("utf-8"))
pango_font_description_set_style(font_desc, PangoUtils.str2style(slant).value)
pango_font_description_set_weight(font_desc, PangoUtils.str2weight(weight).value)
pango_layout_set_font_description(layout, font_desc)
pango_font_description_free(font_desc)
cairo_move_to(context,START_X,START_Y)
pango_cairo_update_layout(context,layout)
pango_layout_set_markup(layout,text_bytes,-1)
pango_cairo_show_layout(context, layout)
status = cairo_status(context)
if context == NULL or status == CAIRO_STATUS_NO_MEMORY:
cairo_destroy(context)
cairo_surface_destroy(surface)
g_object_unref(layout)
raise MemoryError("Cairo.Context can't be created.")
elif status != CAIRO_STATUS_SUCCESS:
cairo_destroy(context)
cairo_surface_destroy(surface)
g_object_unref(layout)
raise Exception(cairo_status_to_string(status).decode())
cairo_destroy(context)
cairo_surface_destroy(surface)
g_object_unref(layout)
return file_name
cpdef str pango_version():
return pango_version_string().decode('utf-8')
cpdef str cairo_version():
return cairo_version_string().decode('utf-8')
ManimPango-0.6.0/manimpango/enums.pyx 0000664 0000000 0000000 00000004635 14671313014 0017572 0 ustar 00root root 0000000 0000000 from enum import Enum
from pango cimport *
class Style(Enum):
"""
An enumeration specifying the various slant styles possible for a font.
Attributes
----------
NORMAL :
the font is upright.
ITALIC :
the font is slanted, but in a roman style.
OBLIQUE:
the font is slanted in an italic style.
"""
NORMAL = PANGO_STYLE_NORMAL
ITALIC = PANGO_STYLE_ITALIC
OBLIQUE = PANGO_STYLE_OBLIQUE
class Weight(Enum):
"""
An enumeration specifying the weight (boldness) of a font.
This is a numerical value ranging from 100 to 1000, but there are some predefined values
Using numerical value other then that defined here is not supported.
Attributes
----------
NORMAL :
the default weight (= 400)
BOLD :
the bold weight( = 700)
THIN :
the thin weight( = 100; Since: 1.24)
ULTRALIGHT :
the ultralight weight( = 200)
LIGHT :
the light weight( = 300)
BOOK :
the book weight( = 380; Since: 1.24)
MEDIUM :
the normal weight( = 500; Since: 1.24)
SEMIBOLD :
the semibold weight( = 600)
ULTRABOLD :
the ultrabold weight( = 800)
HEAVY :
the heavy weight( = 900)
ULTRAHEAVY :
the ultraheavy weight( = 1000; Since: 1.24)
"""
NORMAL = PANGO_WEIGHT_NORMAL
BOLD = PANGO_WEIGHT_BOLD
THIN = PANGO_WEIGHT_THIN
ULTRALIGHT = PANGO_WEIGHT_ULTRALIGHT
LIGHT = PANGO_WEIGHT_LIGHT
BOOK = PANGO_WEIGHT_BOOK
MEDIUM = PANGO_WEIGHT_MEDIUM
SEMIBOLD = PANGO_WEIGHT_SEMIBOLD
ULTRABOLD = PANGO_WEIGHT_ULTRABOLD
HEAVY = PANGO_WEIGHT_HEAVY
ULTRAHEAVY = PANGO_WEIGHT_ULTRAHEAVY
class Variant(Enum):
"""
An enumeration specifying capitalization variant of the font.
Attributes
----------
NORMAL :
A normal font.
SMALL_CAPS :
A font with the lower case characters replaced by smaller variants
of the capital characters.
"""
NORMAL = PANGO_VARIANT_NORMAL
SMALL_CAPS = PANGO_VARIANT_SMALL_CAPS
class Alignment(Enum):
"""
An enumeration specifying alignment.
Attributes
----------
NORMAL :
A normal font.
SMALL_CAPS :
A font with the lower case characters replaced by smaller variants
of the capital characters.
"""
LEFT = PANGO_ALIGN_LEFT
CENTER = PANGO_ALIGN_CENTER
RIGHT = PANGO_ALIGN_RIGHT
ManimPango-0.6.0/manimpango/glib.pxd 0000664 0000000 0000000 00000000566 14671313014 0017332 0 ustar 00root root 0000000 0000000 cdef extern from "glib.h":
ctypedef void* gpointer
ctypedef int gint
ctypedef unsigned int guint
ctypedef gint gboolean
ctypedef unsigned short guint16
ctypedef char gchar
ctypedef struct GError:
gint code
gchar *message
void g_error_free (GError *error)
void g_object_unref(gpointer object)
void g_free(gpointer mem)
ManimPango-0.6.0/manimpango/pango.pxd 0000664 0000000 0000000 00000012340 14671313014 0017512 0 ustar 00root root 0000000 0000000 from cairo cimport *
from glib cimport *
cdef extern from "pango/pangocairo.h":
int PANGO_SCALE
int pango_units_from_double(double d)
double pango_units_to_double (int i)
ctypedef struct PangoLayout:
pass
ctypedef struct PangoContext:
pass
ctypedef struct PangoFontMap:
pass
ctypedef struct PangoFontDescription:
pass
ctypedef struct PangoFontFamily:
pass
ctypedef enum PangoStyle:
PANGO_STYLE_NORMAL
PANGO_STYLE_OBLIQUE
PANGO_STYLE_ITALIC
ctypedef enum PangoWeight:
PANGO_WEIGHT_THIN
PANGO_WEIGHT_ULTRALIGHT
PANGO_WEIGHT_LIGHT
PANGO_WEIGHT_BOOK
PANGO_WEIGHT_NORMAL
PANGO_WEIGHT_MEDIUM
PANGO_WEIGHT_SEMIBOLD
PANGO_WEIGHT_BOLD
PANGO_WEIGHT_ULTRABOLD
PANGO_WEIGHT_HEAVY
PANGO_WEIGHT_ULTRAHEAVY
ctypedef enum PangoVariant:
PANGO_VARIANT_NORMAL
PANGO_VARIANT_SMALL_CAPS
ctypedef enum PangoWrapMode:
PANGO_WRAP_WORD
PANGO_WRAP_CHAR
PANGO_WRAP_WORD_CHAR
ctypedef enum PangoAlignment:
PANGO_ALIGN_LEFT
PANGO_ALIGN_CENTER
PANGO_ALIGN_RIGHT
PangoLayout* pango_cairo_create_layout(cairo_t* cr)
void pango_cairo_show_layout(
cairo_t* cr,
PangoLayout* layout
)
void pango_cairo_update_layout(
cairo_t* cr,
PangoLayout* layout
)
PangoFontDescription* pango_font_description_new()
void pango_font_description_set_size(
PangoFontDescription* desc,
gint size
)
void pango_font_description_set_family(
PangoFontDescription* desc,
const char* family
)
void pango_font_description_set_style(
PangoFontDescription* desc,
PangoStyle style
)
void pango_font_description_set_weight(
PangoFontDescription* desc,
PangoWeight weight
)
void pango_font_description_set_variant(
PangoFontDescription* desc,
PangoVariant variant
)
void pango_layout_set_width(
PangoLayout* layout,
int width
)
void pango_layout_set_font_description(
PangoLayout* layout,
const PangoFontDescription* desc
)
void pango_layout_set_text(
PangoLayout* layout,
const char* text,
int length
)
void pango_layout_set_wrap(
PangoLayout *layout,
PangoWrapMode wrap
)
void pango_layout_set_markup(
PangoLayout *layout,
const char *markup,
int length
)
void pango_layout_get_size(
PangoLayout* layout,
int* width,
int* height
)
const char* pango_version_string()
void pango_font_description_free(
PangoFontDescription *desc
)
gboolean pango_parse_markup(
const char *markup_text,
int length,
unsigned int accel_marker,
void* attr_list,
void* text,
void* accel_char,
void* error
)
PangoFontMap* pango_cairo_font_map_new()
void pango_font_map_list_families(
PangoFontMap *fontmap,
PangoFontFamily ***families,
int *n_families
)
PangoFontFamily* pango_font_map_get_family(
PangoFontMap *fontmap,
const char *name
)
const char* pango_font_family_get_name(
PangoFontFamily *family
)
void pango_layout_set_justify(
PangoLayout *layout,
gboolean justify
)
void pango_layout_set_indent(
PangoLayout *layout,
int indent
)
void pango_layout_set_alignment(
PangoLayout *layout,
PangoAlignment alignment
)
PangoFontMap* pango_context_get_font_map(
PangoContext* context
)
PangoContext* pango_layout_get_context(
PangoLayout* layout
)
cdef extern from *:
"""
#if _WIN32
#include
#endif
#if PANGO_VERSION_CHECK(1,44,0)
int set_line_width(PangoLayout *layout,float spacing)
{
pango_layout_set_line_spacing(layout, spacing);
return 1;
}
#else
int set_line_width(PangoLayout *layout,float spacing){return 0;}
#endif
#if _WIN32 && PANGO_VERSION_CHECK(1,52,0)
gboolean font_map_add_font_file(PangoFontMap *font_map,
const char *font_file_path,
GError **error)
{
return pango_win32_font_map_add_font_file(font_map, font_file_path, error);
}
#else
gboolean font_map_add_font_file(PangoFontMap *font_map,
const char *font_file_path,
GError **error)
{
return 1;
}
#endif
"""
# The above docs string is C which is used to
# check for the Pango Version there at run time.
# pango_layout_set_line_spacing is only avaiable only for
# pango>=1.44.0 but we support pango>=1.30.0 that why this
# conditionals.
bint set_line_width(PangoLayout *layout,float spacing)
# only for windows and 1.52.0+
gboolean font_map_add_font_file(PangoFontMap *font_map,
const char *font_file_path,
GError **error)
ManimPango-0.6.0/manimpango/register_font.py 0000664 0000000 0000000 00000007557 14671313014 0021133 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
from __future__ import annotations
from functools import lru_cache
from ._register_font import (
RegisteredFont,
_fc_register_font,
_fc_unregister_font,
_list_fonts,
_register_font,
_unregister_font,
)
__all__ = [
"fc_register_font",
"fc_unregister_font",
"list_fonts",
"register_font",
"unregister_font",
"registered_fonts",
"RegisteredFont",
]
# An set of all registered font paths
registered_fonts: set[RegisteredFont] = set()
def fc_register_font(font_path: str) -> None:
"""This function registers the font file using ``fontconfig`` so that
it is available for use by Pango. On Linux it is aliased to
:func:`register_font` and on Windows and macOS this would work only when
using ``fontconfig`` backend.
Parameters
==========
font_path : :class:`str`
Relative or absolute path to font file.
Returns
=======
:class:`bool`
True means it worked without any error.
False means there was an unknown error
Examples
========
>>> register_font("/home/roboto.tff")
True
Raises
======
AssertionError
The :param:`font_path` specified doesn't exist.
"""
return _fc_register_font(registered_fonts, font_path)
def fc_unregister_font(font_path: str) -> None:
"""This function unregister (removes) the font file using
``fontconfig``. It is mostly optional to call this.
Mainly used in tests. On Linux it is aliased to
:func:`unregister_font` and on Windows and macOS this
would work only when using ``fontconfig`` backend.
Parameters
==========
font_path: :class:`str`
For compatibility with the windows function.
Returns
=======
:class:`bool`
True means it worked without any error.
False means there was an unknown error
"""
return _fc_unregister_font(registered_fonts, font_path)
def register_font(font_path: str) -> None:
"""This function registers the font file using native OS API
to make the font available for use by Pango. On Linux it is
aliased to :func:`fc_register_font` and on Windows and macOS
it uses the native API.
Parameters
==========
font_path: :class:`str`
Relative or absolute path to font file.
Returns
=======
:class:`bool`
True means it worked without any error.
False means there was an unknown error
Examples
========
>>> register_font("C:/home/roboto.tff")
True
Raises
======
AssertionError
The :param:`font_path` specified doesn't exist.
"""
return _register_font(registered_fonts, font_path)
def unregister_font(font_path: str) -> None:
"""This function unregister (removes) the font file using native OS API.
It is mostly optional to call this. Mainly used in tests. On Linux it is
aliased to :func:`fc_unregister_font` and on Windows and macOS it uses
the native API.
Parameters
==========
font_path: :class:`str`
Relative or absolute path to font file.
Returns
=======
:class:`bool`
True means it worked without any error.
False means there was an unknown error
Examples
========
>>> unregister_font("C:/home/roboto.tff")
True
Raises
======
AssertionError
The :param:`font_path` specified doesn't exist.
"""
return _unregister_font(registered_fonts, font_path)
def list_fonts() -> list:
"""Lists the fonts available to Pango.
This is usually same as system fonts but it also
includes the fonts added through :func:`register_font`
or :func:`fc_register_font`.
Returns
-------
:class:`list` :
List of fonts sorted alphabetically.
"""
return lru_cache(maxsize=None)(_list_fonts)(
tuple(sorted(registered_fonts, key=lambda x: x.path))
)
ManimPango-0.6.0/manimpango/utils.pxi 0000664 0000000 0000000 00000001152 14671313014 0017552 0 ustar 00root root 0000000 0000000 from _register_font cimport *
import warnings
cdef inline add_to_fontmap(PangoFontMap* fontmap, str font_path):
cdef GError *err = NULL
error_message = ""
font_path_bytes = font_path.encode('utf-8')
success = font_map_add_font_file(fontmap, font_path_bytes, &err)
if err == NULL:
error_message = "Unknown error"
else:
error_message = err.message.decode('utf-8')
if not success:
warnings.warn(
f"Failed to add font at {font_path} to fontmap. Reason: {error_message}",
RuntimeWarning,
stacklevel=2
)
return success
ManimPango-0.6.0/manimpango/utils.py 0000664 0000000 0000000 00000003125 14671313014 0017404 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
import re
from .enums import Style, Weight
class PangoUtils:
@staticmethod
def str2style(string: str) -> Style:
"""Internally used function. Converts text to Pango Understandable Styles."""
styles = {
"NORMAL": Style.NORMAL,
"ITALIC": Style.ITALIC,
"OBLIQUE": Style.OBLIQUE,
}
try:
return styles[string]
except KeyError:
raise AttributeError("There is no Style Called %s" % string)
@staticmethod
def str2weight(string: str) -> Weight:
"""Internally used function. Convert text to Pango Understandable Weight"""
weights = {
"NORMAL": Weight.NORMAL,
"BOLD": Weight.BOLD,
"THIN": Weight.THIN,
"ULTRALIGHT": Weight.ULTRALIGHT,
"LIGHT": Weight.LIGHT,
"BOOK": Weight.BOOK,
"MEDIUM": Weight.MEDIUM,
"SEMIBOLD": Weight.SEMIBOLD,
"ULTRABOLD": Weight.ULTRABOLD,
"HEAVY": Weight.HEAVY,
"ULTRAHEAVY": Weight.ULTRAHEAVY,
}
try:
return weights[string]
except KeyError:
raise AttributeError("There is no Font Weight Called %s" % string)
@staticmethod
def remove_last_M(file_name: str) -> None:
"""Remove element from the SVG file in order to allow comparison."""
with open(file_name, "r") as fpr:
content = fpr.read()
content = re.sub(r'Z M [^A-Za-z]*? "\/>', 'Z "/>', content)
with open(file_name, "w") as fpw:
fpw.write(content)
ManimPango-0.6.0/packing/ 0000775 0000000 0000000 00000000000 14671313014 0015157 5 ustar 00root root 0000000 0000000 ManimPango-0.6.0/packing/LICENSE.bin 0000664 0000000 0000000 00000471172 14671313014 0016747 0 ustar 00root root 0000000 0000000 ----
This binary distribution of ManimPango also bundles the following software:
Name: Cairo
Files: *cairo*.*
Description: bundled as a dynamically linked library
Availability: https://gitlab.freedesktop.org/cairo/cairo
License: LGPL-2.1 + MPL-1.1
Cairo is free software.
Every source file in the implementation[*] of cairo is available to be
redistributed and/or modified under the terms of either the GNU Lesser
General Public License (LGPL) version 2.1 or the Mozilla Public
License (MPL) version 1.1. Some files are available under more
liberal terms, but we believe that in all cases, each file may be used
under either the LGPL or the MPL.
See the following files in this directory for the precise terms and
conditions of either license:
COPYING-LGPL-2.1
COPYING-MPL-1.1
Please see each file in the implementation for copyright and licensing
information, (in the opening comment of each file).
[*] The implementation of cairo is contained entirely within the "src"
directory of the cairo source distribution. There are other components
of the cairo source distribution (such as the "test", "util", and "perf")
that are auxiliary to the library itself. None of the source code in these
directories contributes to a build of the cairo library itself, (libcairo.so
or cairo.dll or similar).
These auxiliary components are also free software, but may be under
different license terms than cairo itself. For example, most of the
test cases in the perf and test directories are made available under
an MIT license to simplify any use of this code for reference purposes
in using cairo itself. Other files might be available under the GNU
General Public License (GPL), for example. Again, please see the COPYING
file under each directory and the opening comment of each file for copyright
and licensing information.
COPYING-LGPL-2.1
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations
below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it
becomes a de-facto standard. To achieve this, non-free programs must
be allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control
compilation and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at least
three years, to give the same user the materials specified in
Subsection 6a, above, for a charge no more than the cost of
performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply, and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License
may add an explicit geographical distribution limitation excluding those
countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms
of the ordinary General Public License).
To apply these terms, attach the following notices to the library.
It is safest to attach them to the start of each source file to most
effectively convey the exclusion of warranty; and each file should
have at least the "copyright" line and a pointer to where the full
notice is found.
Copyright (C)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or
your school, if any, to sign a "copyright disclaimer" for the library,
if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James
Random Hacker.
, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
COPYING-MPL-1.1
MOZILLA PUBLIC LICENSE
Version 1.1
---------------
1. Definitions.
1.0.1. "Commercial Use" means distribution or otherwise making the
Covered Code available to a third party.
1.1. "Contributor" means each entity that creates or contributes to
the creation of Modifications.
1.2. "Contributor Version" means the combination of the Original
Code, prior Modifications used by a Contributor, and the Modifications
made by that particular Contributor.
1.3. "Covered Code" means the Original Code or Modifications or the
combination of the Original Code and Modifications, in each case
including portions thereof.
1.4. "Electronic Distribution Mechanism" means a mechanism generally
accepted in the software development community for the electronic
transfer of data.
1.5. "Executable" means Covered Code in any form other than Source
Code.
1.6. "Initial Developer" means the individual or entity identified
as the Initial Developer in the Source Code notice required by Exhibit
A.
1.7. "Larger Work" means a work which combines Covered Code or
portions thereof with code not governed by the terms of this License.
1.8. "License" means this document.
1.8.1. "Licensable" means having the right to grant, to the maximum
extent possible, whether at the time of the initial grant or
subsequently acquired, any and all of the rights conveyed herein.
1.9. "Modifications" means any addition to or deletion from the
substance or structure of either the Original Code or any previous
Modifications. When Covered Code is released as a series of files, a
Modification is:
A. Any addition to or deletion from the contents of a file
containing Original Code or previous Modifications.
B. Any new file that contains any part of the Original Code or
previous Modifications.
1.10. "Original Code" means Source Code of computer software code
which is described in the Source Code notice required by Exhibit A as
Original Code, and which, at the time of its release under this
License is not already Covered Code governed by this License.
1.10.1. "Patent Claims" means any patent claim(s), now owned or
hereafter acquired, including without limitation, method, process,
and apparatus claims, in any patent Licensable by grantor.
1.11. "Source Code" means the preferred form of the Covered Code for
making modifications to it, including all modules it contains, plus
any associated interface definition files, scripts used to control
compilation and installation of an Executable, or source code
differential comparisons against either the Original Code or another
well known, available Covered Code of the Contributor's choice. The
Source Code can be in a compressed or archival form, provided the
appropriate decompression or de-archiving software is widely available
for no charge.
1.12. "You" (or "Your") means an individual or a legal entity
exercising rights under, and complying with all of the terms of, this
License or a future version of this License issued under Section 6.1.
For legal entities, "You" includes any entity which controls, is
controlled by, or is under common control with You. For purposes of
this definition, "control" means (a) the power, direct or indirect,
to cause the direction or management of such entity, whether by
contract or otherwise, or (b) ownership of more than fifty percent
(50%) of the outstanding shares or beneficial ownership of such
entity.
2. Source Code License.
2.1. The Initial Developer Grant.
The Initial Developer hereby grants You a world-wide, royalty-free,
non-exclusive license, subject to third party intellectual property
claims:
(a) under intellectual property rights (other than patent or
trademark) Licensable by Initial Developer to use, reproduce,
modify, display, perform, sublicense and distribute the Original
Code (or portions thereof) with or without Modifications, and/or
as part of a Larger Work; and
(b) under Patents Claims infringed by the making, using or
selling of Original Code, to make, have made, use, practice,
sell, and offer for sale, and/or otherwise dispose of the
Original Code (or portions thereof).
(c) the licenses granted in this Section 2.1(a) and (b) are
effective on the date Initial Developer first distributes
Original Code under the terms of this License.
(d) Notwithstanding Section 2.1(b) above, no patent license is
granted: 1) for code that You delete from the Original Code; 2)
separate from the Original Code; or 3) for infringements caused
by: i) the modification of the Original Code or ii) the
combination of the Original Code with other software or devices.
2.2. Contributor Grant.
Subject to third party intellectual property claims, each Contributor
hereby grants You a world-wide, royalty-free, non-exclusive license
(a) under intellectual property rights (other than patent or
trademark) Licensable by Contributor, to use, reproduce, modify,
display, perform, sublicense and distribute the Modifications
created by such Contributor (or portions thereof) either on an
unmodified basis, with other Modifications, as Covered Code
and/or as part of a Larger Work; and
(b) under Patent Claims infringed by the making, using, or
selling of Modifications made by that Contributor either alone
and/or in combination with its Contributor Version (or portions
of such combination), to make, use, sell, offer for sale, have
made, and/or otherwise dispose of: 1) Modifications made by that
Contributor (or portions thereof); and 2) the combination of
Modifications made by that Contributor with its Contributor
Version (or portions of such combination).
(c) the licenses granted in Sections 2.2(a) and 2.2(b) are
effective on the date Contributor first makes Commercial Use of
the Covered Code.
(d) Notwithstanding Section 2.2(b) above, no patent license is
granted: 1) for any code that Contributor has deleted from the
Contributor Version; 2) separate from the Contributor Version;
3) for infringements caused by: i) third party modifications of
Contributor Version or ii) the combination of Modifications made
by that Contributor with other software (except as part of the
Contributor Version) or other devices; or 4) under Patent Claims
infringed by Covered Code in the absence of Modifications made by
that Contributor.
3. Distribution Obligations.
3.1. Application of License.
The Modifications which You create or to which You contribute are
governed by the terms of this License, including without limitation
Section 2.2. The Source Code version of Covered Code may be
distributed only under the terms of this License or a future version
of this License released under Section 6.1, and You must include a
copy of this License with every copy of the Source Code You
distribute. You may not offer or impose any terms on any Source Code
version that alters or restricts the applicable version of this
License or the recipients' rights hereunder. However, You may include
an additional document offering the additional rights described in
Section 3.5.
3.2. Availability of Source Code.
Any Modification which You create or to which You contribute must be
made available in Source Code form under the terms of this License
either on the same media as an Executable version or via an accepted
Electronic Distribution Mechanism to anyone to whom you made an
Executable version available; and if made available via Electronic
Distribution Mechanism, must remain available for at least twelve (12)
months after the date it initially became available, or at least six
(6) months after a subsequent version of that particular Modification
has been made available to such recipients. You are responsible for
ensuring that the Source Code version remains available even if the
Electronic Distribution Mechanism is maintained by a third party.
3.3. Description of Modifications.
You must cause all Covered Code to which You contribute to contain a
file documenting the changes You made to create that Covered Code and
the date of any change. You must include a prominent statement that
the Modification is derived, directly or indirectly, from Original
Code provided by the Initial Developer and including the name of the
Initial Developer in (a) the Source Code, and (b) in any notice in an
Executable version or related documentation in which You describe the
origin or ownership of the Covered Code.
3.4. Intellectual Property Matters
(a) Third Party Claims.
If Contributor has knowledge that a license under a third party's
intellectual property rights is required to exercise the rights
granted by such Contributor under Sections 2.1 or 2.2,
Contributor must include a text file with the Source Code
distribution titled "LEGAL" which describes the claim and the
party making the claim in sufficient detail that a recipient will
know whom to contact. If Contributor obtains such knowledge after
the Modification is made available as described in Section 3.2,
Contributor shall promptly modify the LEGAL file in all copies
Contributor makes available thereafter and shall take other steps
(such as notifying appropriate mailing lists or newsgroups)
reasonably calculated to inform those who received the Covered
Code that new knowledge has been obtained.
(b) Contributor APIs.
If Contributor's Modifications include an application programming
interface and Contributor has knowledge of patent licenses which
are reasonably necessary to implement that API, Contributor must
also include this information in the LEGAL file.
(c) Representations.
Contributor represents that, except as disclosed pursuant to
Section 3.4(a) above, Contributor believes that Contributor's
Modifications are Contributor's original creation(s) and/or
Contributor has sufficient rights to grant the rights conveyed by
this License.
3.5. Required Notices.
You must duplicate the notice in Exhibit A in each file of the Source
Code. If it is not possible to put such notice in a particular Source
Code file due to its structure, then You must include such notice in a
location (such as a relevant directory) where a user would be likely
to look for such a notice. If You created one or more Modification(s)
You may add your name as a Contributor to the notice described in
Exhibit A. You must also duplicate this License in any documentation
for the Source Code where You describe recipients' rights or ownership
rights relating to Covered Code. You may choose to offer, and to
charge a fee for, warranty, support, indemnity or liability
obligations to one or more recipients of Covered Code. However, You
may do so only on Your own behalf, and not on behalf of the Initial
Developer or any Contributor. You must make it absolutely clear than
any such warranty, support, indemnity or liability obligation is
offered by You alone, and You hereby agree to indemnify the Initial
Developer and every Contributor for any liability incurred by the
Initial Developer or such Contributor as a result of warranty,
support, indemnity or liability terms You offer.
3.6. Distribution of Executable Versions.
You may distribute Covered Code in Executable form only if the
requirements of Section 3.1-3.5 have been met for that Covered Code,
and if You include a notice stating that the Source Code version of
the Covered Code is available under the terms of this License,
including a description of how and where You have fulfilled the
obligations of Section 3.2. The notice must be conspicuously included
in any notice in an Executable version, related documentation or
collateral in which You describe recipients' rights relating to the
Covered Code. You may distribute the Executable version of Covered
Code or ownership rights under a license of Your choice, which may
contain terms different from this License, provided that You are in
compliance with the terms of this License and that the license for the
Executable version does not attempt to limit or alter the recipient's
rights in the Source Code version from the rights set forth in this
License. If You distribute the Executable version under a different
license You must make it absolutely clear that any terms which differ
from this License are offered by You alone, not by the Initial
Developer or any Contributor. You hereby agree to indemnify the
Initial Developer and every Contributor for any liability incurred by
the Initial Developer or such Contributor as a result of any such
terms You offer.
3.7. Larger Works.
You may create a Larger Work by combining Covered Code with other code
not governed by the terms of this License and distribute the Larger
Work as a single product. In such a case, You must make sure the
requirements of this License are fulfilled for the Covered Code.
4. Inability to Comply Due to Statute or Regulation.
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Code due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description
must be included in the LEGAL file described in Section 3.4 and must
be included with all distributions of the Source Code. Except to the
extent prohibited by statute or regulation, such description must be
sufficiently detailed for a recipient of ordinary skill to be able to
understand it.
5. Application of this License.
This License applies to code to which the Initial Developer has
attached the notice in Exhibit A and to related Covered Code.
6. Versions of the License.
6.1. New Versions.
Netscape Communications Corporation ("Netscape") may publish revised
and/or new versions of the License from time to time. Each version
will be given a distinguishing version number.
6.2. Effect of New Versions.
Once Covered Code has been published under a particular version of the
License, You may always continue to use it under the terms of that
version. You may also choose to use such Covered Code under the terms
of any subsequent version of the License published by Netscape. No one
other than Netscape has the right to modify the terms applicable to
Covered Code created under this License.
6.3. Derivative Works.
If You create or use a modified version of this License (which you may
only do in order to apply it to code which is not already Covered Code
governed by this License), You must (a) rename Your license so that
the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
"MPL", "NPL" or any confusingly similar phrase do not appear in your
license (except to note that your license differs from this License)
and (b) otherwise make it clear that Your version of the license
contains terms which differ from the Mozilla Public License and
Netscape Public License. (Filling in the name of the Initial
Developer, Original Code or Contributor in the notice described in
Exhibit A shall not of themselves be deemed to be modifications of
this License.)
7. DISCLAIMER OF WARRANTY.
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
8. TERMINATION.
8.1. This License and the rights granted hereunder will terminate
automatically if You fail to comply with terms herein and fail to cure
such breach within 30 days of becoming aware of the breach. All
sublicenses to the Covered Code which are properly granted shall
survive any termination of this License. Provisions which, by their
nature, must remain in effect beyond the termination of this License
shall survive.
8.2. If You initiate litigation by asserting a patent infringement
claim (excluding declatory judgment actions) against Initial Developer
or a Contributor (the Initial Developer or Contributor against whom
You file such action is referred to as "Participant") alleging that:
(a) such Participant's Contributor Version directly or indirectly
infringes any patent, then any and all rights granted by such
Participant to You under Sections 2.1 and/or 2.2 of this License
shall, upon 60 days notice from Participant terminate prospectively,
unless if within 60 days after receipt of notice You either: (i)
agree in writing to pay Participant a mutually agreeable reasonable
royalty for Your past and future use of Modifications made by such
Participant, or (ii) withdraw Your litigation claim with respect to
the Contributor Version against such Participant. If within 60 days
of notice, a reasonable royalty and payment arrangement are not
mutually agreed upon in writing by the parties or the litigation claim
is not withdrawn, the rights granted by Participant to You under
Sections 2.1 and/or 2.2 automatically terminate at the expiration of
the 60 day notice period specified above.
(b) any software, hardware, or device, other than such Participant's
Contributor Version, directly or indirectly infringes any patent, then
any rights granted to You by such Participant under Sections 2.1(b)
and 2.2(b) are revoked effective as of the date You first made, used,
sold, distributed, or had made, Modifications made by that
Participant.
8.3. If You assert a patent infringement claim against Participant
alleging that such Participant's Contributor Version directly or
indirectly infringes any patent where such claim is resolved (such as
by license or settlement) prior to the initiation of patent
infringement litigation, then the reasonable value of the licenses
granted by such Participant under Sections 2.1 or 2.2 shall be taken
into account in determining the amount or value of any payment or
license.
8.4. In the event of termination under Sections 8.1 or 8.2 above,
all end user license agreements (excluding distributors and resellers)
which have been validly granted by You or any distributor hereunder
prior to termination shall survive termination.
9. LIMITATION OF LIABILITY.
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
10. U.S. GOVERNMENT END USERS.
The Covered Code is a "commercial item," as that term is defined in
48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
software" and "commercial computer software documentation," as such
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
all U.S. Government End Users acquire Covered Code with only those
rights set forth herein.
11. MISCELLANEOUS.
This License represents the complete agreement concerning subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. This License shall be governed by
California law provisions (except to the extent applicable law, if
any, provides otherwise), excluding its conflict-of-law provisions.
With respect to disputes in which at least one party is a citizen of,
or an entity chartered or registered to do business in the United
States of America, any litigation relating to this License shall be
subject to the jurisdiction of the Federal Courts of the Northern
District of California, with venue lying in Santa Clara County,
California, with the losing party responsible for costs, including
without limitation, court costs and reasonable attorneys' fees and
expenses. The application of the United Nations Convention on
Contracts for the International Sale of Goods is expressly excluded.
Any law or regulation which provides that the language of a contract
shall be construed against the drafter shall not apply to this
License.
12. RESPONSIBILITY FOR CLAIMS.
As between Initial Developer and the Contributors, each party is
responsible for claims and damages arising, directly or indirectly,
out of its utilization of rights under this License and You agree to
work with Initial Developer and Contributors to distribute such
responsibility on an equitable basis. Nothing herein is intended or
shall be deemed to constitute any admission of liability.
13. MULTIPLE-LICENSED CODE.
Initial Developer may designate portions of the Covered Code as
"Multiple-Licensed". "Multiple-Licensed" means that the Initial
Developer permits you to utilize portions of the Covered Code under
Your choice of the NPL or the alternative licenses, if any, specified
by the Initial Developer in the file described in Exhibit A.
EXHIBIT A -Mozilla Public License.
``The contents of this file are subject to the Mozilla Public License
Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
The Original Code is ______________________________________.
The Initial Developer of the Original Code is ________________________.
Portions created by ______________________ are Copyright (C) ______
_______________________. All Rights Reserved.
Contributor(s): ______________________________________.
Alternatively, the contents of this file may be used under the terms
of the _____ license (the "[___] License"), in which case the
provisions of [______] License are applicable instead of those
above. If you wish to allow use of your version of this file only
under the terms of the [____] License and not to allow others to use
your version of this file under the MPL, indicate your decision by
deleting the provisions above and replace them with the notice and
other provisions required by the [___] License. If you do not delete
the provisions above, a recipient may use your version of this file
under either the MPL or the [___] License."
[NOTE: The text of this Exhibit A may differ slightly from the text of
the notices in the Source Code files of the Original Code. You should
use the text of this Exhibit A rather than the text found in the
Original Code Source Code for Your Modifications.]
Name: Pango
Files: *pango*.*
Description: bundled as a dynamically linked library
Availability: https://gitlab.gnome.org/GNOME/pango
License: GNU Lesser Public License (LGPL)
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Library General Public License, applies to some
specially designated Free Software Foundation software, and to any
other libraries whose authors decide to use it. You can use it for
your libraries, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the library, or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link a program with the library, you must provide
complete object files to the recipients so that they can relink them
with the library, after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
Our method of protecting your rights has two steps: (1) copyright
the library, and (2) offer you this license which gives you legal
permission to copy, distribute and/or modify the library.
Also, for each distributor's protection, we want to make certain
that everyone understands that there is no warranty for this free
library. If the library is modified by someone else and passed on, we
want its recipients to know that what they have is not the original
version, so that any problems introduced by others will not reflect on
the original authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that companies distributing free
software will individually obtain patent licenses, thus in effect
transforming the program into proprietary software. To prevent this,
we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.
Most GNU software, including some libraries, is covered by the ordinary
GNU General Public License, which was designed for utility programs. This
license, the GNU Library General Public License, applies to certain
designated libraries. This license is quite different from the ordinary
one; be sure to read it in full, and don't assume that anything in it is
the same as in the ordinary license.
The reason we have a separate public license for some libraries is that
they blur the distinction we usually make between modifying or adding to a
program and simply using it. Linking a program with a library, without
changing the library, is in some sense simply using the library, and is
analogous to running a utility program or application program. However, in
a textual and legal sense, the linked executable is a combined work, a
derivative of the original library, and the ordinary General Public License
treats it as such.
Because of this blurred distinction, using the ordinary General
Public License for libraries did not effectively promote software
sharing, because most developers did not use the libraries. We
concluded that weaker conditions might promote sharing better.
However, unrestricted linking of non-free programs would deprive the
users of those programs of all benefit from the free status of the
libraries themselves. This Library General Public License is intended to
permit developers of non-free programs to use free libraries, while
preserving your freedom as a user of such programs to change the free
libraries that are incorporated in them. (We have not seen how to achieve
this as regards changes in header files, but we have achieved it as regards
changes in the actual functions of the Library.) The hope is that this
will lead to faster development of free libraries.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, while the latter only
works together with the library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which
contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Library
General Public License (also called "this License"). Each licensee is
addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also compile or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
c) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
d) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the source code distributed need not include anything that is normally
distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Library General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
Copyright (C)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307 USA.
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
Name: Expat
Files: *expat*.*
Description: bundled as a dynamically linked library
Availability: https://github.com/libexpat/libexpat
License: MIT
Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
Copyright (c) 2001-2019 Expat maintainers
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Name: libffi
Files: *ffi*.*
Description: bundled as a dynamically linked library
Availability: https://github.com/libffi/libffi
License: MIT
libffi - Copyright (c) 1996-2020 Anthony Green, Red Hat, Inc and others.
See source files for details.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
``Software''), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Name: fontconfig
Files: *fontconfig*.*
Description: bundled as a dynamically linked library
Availability: https://gitlab.freedesktop.org/fontconfig/fontconfig
License: MIT
fontconfig/COPYING
Copyright ТЉ 2000,2001,2002,2003,2004,2006,2007 Keith Packard
Copyright ТЉ 2005 Patrick Lam
Copyright ТЉ 2007 Dwayne Bailey and Translate.org.za
Copyright ТЉ 2009 Roozbeh Pournader
Copyright ТЉ 2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 Red Hat, Inc.
Copyright ТЉ 2008 Danilo Х egan
Copyright ТЉ 2012 Google, Inc.
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation, and that the name of the author(s) not be used in
advertising or publicity pertaining to distribution of the software without
specific, written prior permission. The authors make no
representations about the suitability of this software for any purpose. It
is provided "as is" without express or implied warranty.
THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
fontconfig/fc-case/CaseFolding.txt
ТЉ 2019 UnicodeТЎ, Inc.
Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
For terms of use, see http://www.unicode.org/terms_of_use.html
fontconfig/src/fcatomic.h
/*
* Mutex operations. Originally copied from HarfBuzz.
*
* Copyright ТЉ 2007 Chris Wilson
* Copyright ТЉ 2009,2010 Red Hat, Inc.
* Copyright ТЉ 2011,2012,2013 Google, Inc.
*
* Permission is hereby granted, without written agreement and without
* license or royalty fees, to use, copy, modify, and distribute this
* software and its documentation for any purpose, provided that the
* above copyright notice and the following two paragraphs appear in
* all copies of this software.
*
* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* Contributor(s):
* Chris Wilson
* Red Hat Author(s): Behdad Esfahbod
* Google Author(s): Behdad Esfahbod
*/
fontconfig/src/fcfoundry.h
/*
Copyright ТЉ 2002-2003 by Juliusz Chroboczek
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
fontconfig/src/fcmd5.h
/*
* This code implements the MD5 message-digest algorithm.
* The algorithm is due to Ron Rivest. This code was
* written by Colin Plumb in 1993, no copyright is claimed.
* This code is in the public domain; do with it what you wish.
*
* Equivalent code is available from RSA Data Security, Inc.
* This code has been tested against that, and is equivalent,
* except that you don't need to include two pages of legalese
* with every copy.
*
* To compute the message digest of a chunk of bytes, declare an
* MD5Context structure, pass it to MD5Init, call MD5Update as
* needed on buffers full of bytes, and then call MD5Final, which
* will fill a supplied 16-byte array with the digest.
*/
fontconfig/src/fcmutex.h
/*
* Atomic int and pointer operations. Originally copied from HarfBuzz.
*
* Copyright ТЉ 2007 Chris Wilson
* Copyright ТЉ 2009,2010 Red Hat, Inc.
* Copyright ТЉ 2011,2012,2013 Google, Inc.
*
* Permission is hereby granted, without written agreement and without
* license or royalty fees, to use, copy, modify, and distribute this
* software and its documentation for any purpose, provided that the
* above copyright notice and the following two paragraphs appear in
* all copies of this software.
*
* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* Contributor(s):
* Chris Wilson
* Red Hat Author(s): Behdad Esfahbod
* Google Author(s): Behdad Esfahbod
*/
fontconfig/src/ftglue.[ch]
/* ftglue.c: Glue code for compiling the OpenType code from
* FreeType 1 using only the public API of FreeType 2
*
* By David Turner, The FreeType Project (www.freetype.org)
*
* This code is explicitely put in the public domain
*
* ==========================================================================
*
* the OpenType parser codes was originally written as an extension to
* FreeType 1.x. As such, its source code was embedded within the library,
* and used many internal FreeType functions to deal with memory and
* stream i/o.
*
* When it was 'salvaged' for Pango and Qt, the code was "ported" to FreeType 2,
* which basically means that some macro tricks were performed in order to
* directly access FT2 _internal_ functions.
*
* these functions were never part of FT2 public API, and _did_ change between
* various releases. This created chaos for many users: when they upgraded the
* FreeType library on their system, they couldn't run Gnome anymore since
* Pango refused to link.
*
* Very fortunately, it's possible to completely avoid this problem because
* the FT_StreamRec and FT_MemoryRec structure types, which describe how
* memory and stream implementations interface with the rest of the font
* library, have always been part of the public API, and never changed.
*
* What we do thus is re-implement, within the OpenType parser, the few
* functions that depend on them. This only adds one or two kilobytes of
* code, and ensures that the parser can work with _any_ version
* of FreeType installed on your system. How sweet... !
*
* Note that we assume that Pango doesn't use any other internal functions
* from FreeType. It used to in old versions, but this should no longer
* be the case. (crossing my fingers).
*
* - David Turner
* - The FreeType Project (www.freetype.org)
*
* PS: This "glue" code is explicitely put in the public domain
*/
Name: FreeType
Files: *freetype*.*
Description: bundled as a dynamically linked library
Availability: https://www.freetype.org/
License: The FreeType Project LICENSE
The FreeType Project LICENSE
----------------------------
2006-Jan-27
Copyright 1996-2002, 2006 by
David Turner, Robert Wilhelm, and Werner Lemberg
Introduction
============
The FreeType Project is distributed in several archive packages;
some of them may contain, in addition to the FreeType font engine,
various tools and contributions which rely on, or relate to, the
FreeType Project.
This license applies to all files found in such packages, and
which do not fall under their own explicit license. The license
affects thus the FreeType font engine, the test programs,
documentation and makefiles, at the very least.
This license was inspired by the BSD, Artistic, and IJG
(Independent JPEG Group) licenses, which all encourage inclusion
and use of free software in commercial and freeware products
alike. As a consequence, its main points are that:
o We don't promise that this software works. However, we will be
interested in any kind of bug reports. (`as is' distribution)
o You can use this software for whatever you want, in parts or
full form, without having to pay us. (`royalty-free' usage)
o You may not pretend that you wrote this software. If you use
it, or only parts of it, in a program, you must acknowledge
somewhere in your documentation that you have used the
FreeType code. (`credits')
We specifically permit and encourage the inclusion of this
software, with or without modifications, in commercial products.
We disclaim all warranties covering The FreeType Project and
assume no liability related to The FreeType Project.
Finally, many people asked us for a preferred form for a
credit/disclaimer to use in compliance with this license. We thus
encourage you to use the following text:
"""
Portions of this software are copyright ТЉ The FreeType
Project (www.freetype.org). All rights reserved.
"""
Please replace with the value from the FreeType version you
actually use.
Legal Terms
===========
0. Definitions
--------------
Throughout this license, the terms `package', `FreeType Project',
and `FreeType archive' refer to the set of files originally
distributed by the authors (David Turner, Robert Wilhelm, and
Werner Lemberg) as the `FreeType Project', be they named as alpha,
beta or final release.
`You' refers to the licensee, or person using the project, where
`using' is a generic term including compiling the project's source
code as well as linking it to form a `program' or `executable'.
This program is referred to as `a program using the FreeType
engine'.
This license applies to all files distributed in the original
FreeType Project, including all source code, binaries and
documentation, unless otherwise stated in the file in its
original, unmodified form as distributed in the original archive.
If you are unsure whether or not a particular file is covered by
this license, you must contact us to verify this.
The FreeType Project is copyright (C) 1996-2000 by David Turner,
Robert Wilhelm, and Werner Lemberg. All rights reserved except as
specified below.
1. No Warranty
--------------
THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO
USE, OF THE FREETYPE PROJECT.
2. Redistribution
-----------------
This license grants a worldwide, royalty-free, perpetual and
irrevocable right and license to use, execute, perform, compile,
display, copy, create derivative works of, distribute and
sublicense the FreeType Project (in both source and object code
forms) and derivative works thereof for any purpose; and to
authorize others to exercise some or all of the rights granted
herein, subject to the following conditions:
o Redistribution of source code must retain this license file
(`FTL.TXT') unaltered; any additions, deletions or changes to
the original files must be clearly indicated in accompanying
documentation. The copyright notices of the unaltered,
original files must be preserved in all copies of source
files.
o Redistribution in binary form must provide a disclaimer that
states that the software is based in part of the work of the
FreeType Team, in the distribution documentation. We also
encourage you to put an URL to the FreeType web page in your
documentation, though this isn't mandatory.
These conditions apply to any software derived from or based on
the FreeType Project, not just the unmodified files. If you use
our work, you must acknowledge us. However, no fee need be paid
to us.
3. Advertising
--------------
Neither the FreeType authors and contributors nor you shall use
the name of the other for commercial, advertising, or promotional
purposes without specific prior written permission.
We suggest, but do not require, that you use one or more of the
following phrases to refer to this software in your documentation
or advertising materials: `FreeType Project', `FreeType Engine',
`FreeType library', or `FreeType Distribution'.
As you have not signed this license, you are not required to
accept it. However, as the FreeType Project is copyrighted
material, only this license, or another one contracted with the
authors, grants you the right to use, distribute, and modify it.
Therefore, by using, distributing, or modifying the FreeType
Project, you indicate that you understand and accept all the terms
of this license.
4. Contacts
-----------
There are two mailing lists related to FreeType:
o freetype@nongnu.org
Discusses general use and applications of FreeType, as well as
future and wanted additions to the library and distribution.
If you are looking for support, start in this list if you
haven't found anything to help you in the documentation.
o freetype-devel@nongnu.org
Discusses bugs, as well as engine internals, design issues,
specific licenses, porting, etc.
Our home page can be found at
https://www.freetype.org
Name: fribidi
Files: *fribidi*.*
Description: bundled as a dynamically linked library
Availability: https://github.com/fribidi/fribidi
License: GNU Lesser General Public License v2.1
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
Copyright (C)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
Name: glib
Files: *g*.*
Description: bundled as a dynamically linked library
Availability: https://gitlab.gnome.org/GNOME/glib
License: LGPL-2.1 License
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
Copyright (C)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
Name: harfbuzz
Files: *harfbuzz*.*
Description: bundled as a dynamically linked library
Availability: https://harfbuzz.github.io/
License: Old MIT
HarfBuzz is licensed under the so-called "Old MIT" license. Details follow.
For parts of HarfBuzz that are licensed under different licenses see individual
files names COPYING in subdirectories where applicable.
Copyright ТЉ 2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 Google, Inc.
Copyright ТЉ 2018,2019,2020 Ebrahim Byagowi
Copyright ТЉ 2019,2020 Facebook, Inc.
Copyright ТЉ 2012 Mozilla Foundation
Copyright ТЉ 2011 Codethink Limited
Copyright ТЉ 2008,2010 Nokia Corporation and/or its subsidiary(-ies)
Copyright ТЉ 2009 Keith Stribley
Copyright ТЉ 2009 Martin Hosken and SIL International
Copyright ТЉ 2007 Chris Wilson
Copyright ТЉ 2006 Behdad Esfahbod
Copyright ТЉ 2005 David Turner
Copyright ТЉ 2004,2007,2008,2009,2010 Red Hat, Inc.
Copyright ТЉ 1998-2004 David Turner and Werner Lemberg
For full copyright notices consult the individual files in the package.
Permission is hereby granted, without written agreement and without
license or royalty fees, to use, copy, modify, and distribute this
software and its documentation for any purpose, provided that the
above copyright notice and the following two paragraphs appear in
all copies of this software.
IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
Name: pixman
Files: *pixman*.*
Description: bundled as a dynamically linked library
Availability: https://gitlab.freedesktop.org/pixman/pixman
License: MIT license
The following is the MIT license, agreed upon by most contributors.
Copyright holders of new code should use this license statement where
possible. They may also add themselves to the list below.
/*
* Copyright 1987, 1988, 1989, 1998 The Open Group
* Copyright 1987, 1988, 1989 Digital Equipment Corporation
* Copyright 1999, 2004, 2008 Keith Packard
* Copyright 2000 SuSE, Inc.
* Copyright 2000 Keith Packard, member of The XFree86 Project, Inc.
* Copyright 2004, 2005, 2007, 2008, 2009, 2010 Red Hat, Inc.
* Copyright 2004 Nicholas Miell
* Copyright 2005 Lars Knoll & Zack Rusin, Trolltech
* Copyright 2005 Trolltech AS
* Copyright 2007 Luca Barbato
* Copyright 2008 Aaron Plattner, NVIDIA Corporation
* Copyright 2008 Rodrigo Kumpera
* Copyright 2008 AndrУЉ TupinambУЁ
* Copyright 2008 Mozilla Corporation
* Copyright 2008 Frederic Plourde
* Copyright 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright 2009, 2010 Nokia Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
Name: libpng
Files: *png*.*
Description: bundled as a dynamically linked library
Availability: http://www.libpng.org/pub/png/libpng.html
License: libpng License
COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
=========================================
PNG Reference Library License version 2
---------------------------------------
* Copyright (c) 1995-2019 The PNG Reference Library Authors.
* Copyright (c) 2018-2019 Cosmin Truta.
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
* Copyright (c) 1996-1997 Andreas Dilger.
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
The software is supplied "as is", without warranty of any kind,
express or implied, including, without limitation, the warranties
of merchantability, fitness for a particular purpose, title, and
non-infringement. In no event shall the Copyright owners, or
anyone distributing the software, be liable for any damages or
other liability, whether in contract, tort or otherwise, arising
from, out of, or in connection with the software, or the use or
other dealings in the software, even if advised of the possibility
of such damage.
Permission is hereby granted to use, copy, modify, and distribute
this software, or portions hereof, for any purpose, without fee,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you
must not claim that you wrote the original software. If you
use this software in a product, an acknowledgment in the product
documentation would be appreciated, but is not required.
2. Altered source versions must be plainly marked as such, and must
not be misrepresented as being the original software.
3. This Copyright notice may not be removed or altered from any
source or altered source distribution.
PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35)
-----------------------------------------------------------------------
libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are
Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
derived from libpng-1.0.6, and are distributed according to the same
disclaimer and license as libpng-1.0.6 with the following individuals
added to the list of Contributing Authors:
Simon-Pierre Cadieux
Eric S. Raymond
Mans Rullgard
Cosmin Truta
Gilles Vollant
James Yu
Mandar Sahastrabuddhe
Google Inc.
Vadim Barkov
and with the following additions to the disclaimer:
There is no warranty against interference with your enjoyment of
the library or against infringement. There is no warranty that our
efforts or the library will fulfill any of your particular purposes
or needs. This library is provided with all faults, and the entire
risk of satisfactory quality, performance, accuracy, and effort is
with the user.
Some files in the "contrib" directory and some configure-generated
files that are distributed with libpng have other copyright owners, and
are released under other open source licenses.
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
libpng-0.96, and are distributed according to the same disclaimer and
license as libpng-0.96, with the following individuals added to the
list of Contributing Authors:
Tom Lane
Glenn Randers-Pehrson
Willem van Schaik
libpng versions 0.89, June 1996, through 0.96, May 1997, are
Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
and are distributed according to the same disclaimer and license as
libpng-0.88, with the following individuals added to the list of
Contributing Authors:
John Bowler
Kevin Bracey
Sam Bushell
Magnus Holmgren
Greg Roelofs
Tom Tanner
Some files in the "scripts" directory have other copyright owners,
but are released under this license.
libpng versions 0.5, May 1995, through 0.88, January 1996, are
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
For the purposes of this copyright and license, "Contributing Authors"
is defined as the following set of individuals:
Andreas Dilger
Dave Martindale
Guy Eric Schalnat
Paul Schmidt
Tim Wegner
The PNG Reference Library is supplied "AS IS". The Contributing
Authors and Group 42, Inc. disclaim all warranties, expressed or
implied, including, without limitation, the warranties of
merchantability and of fitness for any purpose. The Contributing
Authors and Group 42, Inc. assume no liability for direct, indirect,
incidental, special, exemplary, or consequential damages, which may
result from the use of the PNG Reference Library, even if advised of
the possibility of such damage.
Permission is hereby granted to use, copy, modify, and distribute this
source code, or portions hereof, for any purpose, without fee, subject
to the following restrictions:
1. The origin of this source code must not be misrepresented.
2. Altered versions must be plainly marked as such and must not
be misrepresented as being the original source.
3. This Copyright notice may not be removed or altered from any
source or altered source distribution.
The Contributing Authors and Group 42, Inc. specifically permit,
without fee, and encourage the use of this source code as a component
to supporting the PNG file format in commercial products. If you use
this source code in a product, acknowledgment is not required but would
be appreciated.
ManimPango-0.6.0/packing/build_pango_mac.sh 0000664 0000000 0000000 00000010431 14671313014 0020615 0 ustar 00root root 0000000 0000000 #!/bin/bash
# build and install pango
set -e
PANGO_VERSION=1.50.11
GLIB_VERSION=2.74.0
CAIRO_VERSION=1.17.6
FONTCONFIG_VERSION=2.14.0
HARFBUZZ_VERSION=5.3.1
FILE_PATH=$PWD
PREFIX=$HOME/pangobuild
cd $TMPDIR
if [ -d $PREFIX ] ; then
echo "Skipping Build"
exit 0
fi
mkdir pango
cd pango
echo "::group::Downloading Files"
python -m pip install requests
python $FILE_PATH/packing/download_and_extract.py "http://download.gnome.org/sources/pango/${PANGO_VERSION%.*}/pango-${PANGO_VERSION}.tar.xz" pango
python $FILE_PATH/packing/download_and_extract.py "http://download.gnome.org/sources/glib/${GLIB_VERSION%.*}/glib-${GLIB_VERSION}.tar.xz" glib
python $FILE_PATH/packing/download_and_extract.py "https://gitlab.freedesktop.org/cairo/cairo/-/archive/${CAIRO_VERSION}/cairo-${CAIRO_VERSION}.tar.gz" cairo
python $FILE_PATH/packing/download_and_extract.py "https://www.freedesktop.org/software/fontconfig/release/fontconfig-${FONTCONFIG_VERSION}.tar.xz" fontconfig
python $FILE_PATH/packing/download_and_extract.py "https://github.com/harfbuzz/harfbuzz/releases/download/${HARFBUZZ_VERSION}/harfbuzz-${HARFBUZZ_VERSION}.tar.xz" harfbuzz
echo "Fetching and applying patch for Cairo build"
curl -L https://gitlab.freedesktop.org/cairo/cairo/-/commit/cdb7c298c7b89307ad69b94a1126221bd7c06579.patch -o test.diff
cd cairo
patch -Nbp1 -i "$PWD/../test.diff" || true
cd ..
curl -L "https://github.com/frida/proxy-libintl/archive/0.2.tar.gz" -o 0.2.tar.gz
tar -xf 0.2.tar.gz
mv proxy-libintl-0.2 proxy-libintl
python -m pip uninstall -y requests
echo "::endgroup::"
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
export CMAKE_PREFIX_PATH=$PKG_CONFIG_PATH
export LIB_INSTALL_PREFIX=$PREFIX
export PATH="$PATH:$PREFIX/bin"
echo "::group::Install Meson"
echo "Installing Meson and Ninja"
pip3 install -U meson==0.63.3 ninja
echo "::endgroup::"
echo "::group::Removing the things from brew"
brew uninstall --ignore-dependencies brotli
brew uninstall --ignore-dependencies libpng
brew uninstall --ignore-dependencies freetype
brew uninstall --ignore-dependencies libxdmcp
brew uninstall --ignore-dependencies libxcb
brew uninstall --ignore-dependencies xorgproto
brew uninstall --ignore-dependencies libxau
echo "::endgroup::"
export CFLAGS=" -w" # warning are just noise. Ignore it.
echo "::group::Building and installing proxy-libintl"
meson setup --buildtype=release libintlbuilddir proxy-libintl
meson compile -C libintlbuilddir
meson install -C libintlbuilddir
echo "::endgroup::"
echo "::group::Building and installing Fontconfig"
rm -rf /usr/local/share/fontconfig/conf.avail
meson setup \
--buildtype=release \
--prefix=$PREFIX \
--sysconfdir=$HOME \
-Ddoc=disabled \
-Dtests=disabled \
-Dtools=disabled \
--default-library=shared \
fontconfig_builddir fontconfig
meson compile -C fontconfig_builddir
meson install -C fontconfig_builddir
echo "::endgroup::"
echo "::group::Building and installing Glib"
meson setup \
--prefix=$PREFIX \
--buildtype=release \
-Dselinux=disabled \
-Dlibmount=disabled \
-Dtests=false \
--force-fallback-for=pcre,libffi,proxy-libintl,zlib \
--default-library=shared \
glib_builddir glib
meson compile -C glib_builddir
meson install -C glib_builddir
echo "::endgroup::"
echo "::group::Building and installing Cairo"
meson setup \
--prefix=$PREFIX \
--buildtype=release \
-Dfontconfig=enabled \
-Dfreetype=enabled \
-Dtests=disabled \
-Dxlib=disabled \
--force-fallback-for=expat,libpng,pixman \
--default-library=shared \
cairo_builddir cairo
meson compile -C cairo_builddir
meson install -C cairo_builddir
echo "::endgroup::"
echo "::group::Building and installing Harfbuzz"
meson setup \
--prefix=$PREFIX \
--buildtype=release \
-Dtests=disabled \
-Ddocs=disabled \
-Dgobject=disabled \
-Dcoretext=enabled \
-Dfreetype=enabled \
-Dintrospection=disabled \
-Dglib=enabled \
--default-library=shared \
harfbuzz_builddir harfbuzz
meson compile -C harfbuzz_builddir
meson install -C harfbuzz_builddir
echo "::endgroup::"
echo "::group::Building and installing Pango"
export LDFLAGS=" -framework Foundation "
meson setup \
--prefix=$PREFIX \
--buildtype=release \
-Dintrospection=disabled \
-Dxft=disabled \
--default-library=shared \
pango_builddir pango
meson compile -C pango_builddir
meson install -C pango_builddir
echo "::endgroup::"
cd $FILE_PATH
ManimPango-0.6.0/packing/build_pango_tests.sh 0000664 0000000 0000000 00000001524 14671313014 0021222 0 ustar 00root root 0000000 0000000 #!/usr/bin/env bash
# build and install pango
set -e
PANGO_VERSION=1.54.0
FILE_PATH=$PWD
PREFIX="$HOME/pangoprefix"
cd $TMP
cd $TEMPDIR
mkdir pango
cd pango
echo "::group::Downloading Files"
python $FILE_PATH/packing/download_and_extract.py "http://download.gnome.org/sources/pango/${PANGO_VERSION%.*}/pango-${PANGO_VERSION}.tar.xz" pango
echo "::endgroup::"
export CMAKE_PREFIX_PATH=$PKG_CONFIG_PATH
LIB_INSTALL_PREFIX=$PREFIX
echo "::group::Install Meson"
echo "Installing Meson and Ninja"
pip3 install -U meson ninja
echo "::endgroup::"
echo "::group::Buildling and Installing Pango"
meson setup --prefix=$PREFIX --buildtype=release \
-Dintrospection=disabled \
-Dfontconfig=enabled \
--force-fallback-for=fontconfig \
pango_builddir pango
meson compile -C pango_builddir
meson install -C pango_builddir
echo "::endgroup::"
ManimPango-0.6.0/packing/download_and_extract.py 0000664 0000000 0000000 00000002010 14671313014 0021705 0 ustar 00root root 0000000 0000000 #!/usr/bin/python
# -*- coding: utf-8 -*-
import argparse
import logging
import shutil
import tarfile
import tempfile
import urllib.request
from pathlib import Path
logging.basicConfig(format="%(levelname)s - %(message)s", level=logging.INFO)
parser = argparse.ArgumentParser(description="Download things.")
parser.add_argument("url", help="the url to download")
parser.add_argument("folder", help="folder name to extract")
args = parser.parse_args()
with tempfile.TemporaryDirectory() as tmpdirname:
fname = Path(tmpdirname, Path(args.url).name)
logging.info(f"Download & Saving file to {fname}")
urllib.request.urlretrieve(args.url, fname)
with tarfile.open(fname, "r") as tar:
logging.info(f"Extracting {fname} to {tmpdirname}")
tar.extractall(tmpdirname)
logging.info(
f"Moving {Path(tmpdirname, Path(Path(args.url).stem).stem)} "
f"to {str(args.folder)}"
)
shutil.move(
Path(tmpdirname, Path(Path(args.url).stem).stem),
str(args.folder),
)
ManimPango-0.6.0/packing/download_dlls.py 0000664 0000000 0000000 00000006034 14671313014 0020361 0 ustar 00root root 0000000 0000000 #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import os
import re
import shutil
import struct
import tempfile
import zipfile
from pathlib import Path
from urllib.request import urlretrieve as download
PANGO_VERSION = "1.54.0-v3"
def get_platform():
if (struct.calcsize("P") * 8) == 32:
return "x86"
else:
return "x64"
logging.basicConfig(format="%(levelname)s - %(message)s", level=logging.DEBUG)
plat = get_platform()
logging.debug(f"Found Platform as {plat}")
download_url = (
"https://github.com/naveen521kk/pango-build/releases"
f"/download/v{PANGO_VERSION}/pango-v{PANGO_VERSION}-windows-{plat}.zip"
)
final_location = Path(r"C:\cibw\vendor")
download_location = Path(tempfile.mkdtemp())
if final_location.exists():
logging.info("Final Location already exists clearing it...")
shutil.rmtree(str(final_location))
os.makedirs(final_location)
download_file = download_location / "build.zip"
logging.info("Downloading Pango and Cairo Binaries for Windows...")
logging.info("Url:%s", download_url)
download(url=download_url, filename=download_file)
logging.info(f"Download complete. Saved to {download_file}.")
logging.info(f"Extracting {download_file} to {download_location}...")
with zipfile.ZipFile(
download_file, mode="r", compression=zipfile.ZIP_DEFLATED
) as file: # noqa: E501
file.extractall(download_location)
os.remove(download_file)
logging.info("Completed Extracting.")
logging.info("Moving Files accordingly.")
plat_location = download_location / f"pango-{plat}"
for src_file in plat_location.glob("*"):
logging.debug(f"Moving {src_file} to {final_location}...")
shutil.move(str(src_file), str(final_location))
logging.info("Moving files Completed")
logging.info("Fixing .pc files")
rex = re.compile("^prefix=(.*)")
def new_place(_) -> str:
return f"prefix={str(final_location.as_posix())}"
pc_files = final_location / "lib" / "pkgconfig"
for i in pc_files.glob("*.pc"):
logging.info(f"Writing {i}")
with open(i) as f:
content = f.read()
final = rex.sub(new_place, content)
with open(i, "w") as f:
f.write(final)
logging.info("Getting pkg-config")
download(
url="https://github.com/naveen521kk/pango-build"
f"/releases/download/v{PANGO_VERSION}/pkgconf-windows.zip",
filename=download_file,
)
with zipfile.ZipFile(
download_file, mode="r", compression=zipfile.ZIP_DEFLATED
) as file: # noqa: E501
file.extractall(download_location)
os.makedirs(str(final_location / "bin"), exist_ok=True)
shutil.move(
str(download_location / "pkgconf" / "bin" / "pkgconf.exe"),
str(final_location / "bin"),
)
# alias pkgconf to pkg-config
shutil.copy(
final_location / "bin" / "pkgconf.exe", final_location / "bin" / "pkg-config.exe"
)
# On MSVC, meson would create static libraries as
# libcairo.a but setuptools doens't know about it.
libreg = re.compile(r"lib(?P\S*)\.a")
libdir = final_location / "lib"
for lib in libdir.glob("lib*.a"):
name = libreg.match(lib.name).group("name") + ".lib"
shutil.move(lib, libdir / name)
ManimPango-0.6.0/packing/download_pango_macos.py 0000664 0000000 0000000 00000003764 14671313014 0021720 0 ustar 00root root 0000000 0000000 #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import os
import re
import shutil
import sys
import tempfile
import zipfile
from pathlib import Path
from urllib.request import urlretrieve as download
PANGO_VERSION = "1.54.0-v3"
logging.basicConfig(format="%(levelname)s - %(message)s", level=logging.DEBUG)
plat = sys.argv[1]
logging.debug(f"Platform is {plat}")
download_url = (
"https://github.com/naveen521kk/pango-build/releases"
f"/download/v{PANGO_VERSION}/pango-v{PANGO_VERSION}-mac-{plat}.zip"
)
final_location = Path(r"~/pangobuild").expanduser()
download_location = Path(tempfile.mkdtemp())
if final_location.exists():
logging.info("Final Location already exists clearing it...")
shutil.rmtree(str(final_location))
os.makedirs(final_location)
download_file = download_location / "build.zip"
logging.info("Downloading Pango and Cairo Binaries for macOS...")
logging.info("Url: %s", download_url)
download(url=download_url, filename=download_file)
logging.info(f"Download complete. Saved to {download_file}.")
logging.info(f"Extracting {download_file} to {download_location}...")
with zipfile.ZipFile(
download_file, mode="r", compression=zipfile.ZIP_DEFLATED
) as file: # noqa: E501
file.extractall(download_location)
os.remove(download_file)
logging.info("Completed Extracting.")
logging.info("Moving Files accordingly.")
plat_location = download_location / f"mac-pango-{plat}"
for src_file in plat_location.glob("*"):
logging.debug(f"Moving {src_file} to {final_location}...")
shutil.move(str(src_file), str(final_location))
logging.info("Moving files Completed")
logging.info("Fixing .pc files")
rex = re.compile("^prefix=(.*)")
def new_place(_) -> str:
return f"prefix={str(final_location.as_posix())}"
pc_files = final_location / "lib" / "pkgconfig"
for i in pc_files.glob("*.pc"):
logging.info(f"Writing {i}")
with open(i) as f:
content = f.read()
final = rex.sub(new_place, content)
with open(i, "w") as f:
f.write(final)
ManimPango-0.6.0/packing/inject-dlls.py 0000664 0000000 0000000 00000002713 14671313014 0017744 0 ustar 00root root 0000000 0000000 #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import logging
import os
import shutil
import tempfile
from pathlib import Path
from wheel.cli.pack import pack
from wheel.cli.unpack import unpack
parser = argparse.ArgumentParser(
description="Inject DLLs into a Windows binary wheel",
)
parser.add_argument(
"wheel",
type=str,
help="the source wheel to which DLLs should be added",
)
parser.add_argument(
"dest_dir",
type=str,
help="the directory where to create the repaired wheel",
)
parser.add_argument(
"dll_dir",
type=str,
help="the directory containing the DLLs",
)
args = parser.parse_args()
wheel_name = os.path.basename(args.wheel)
package_name = wheel_name.split("-")[0]
version_number = wheel_name.split("-")[1]
repaired_wheel = os.path.join(args.dest_dir, wheel_name)
temp_dir = Path(tempfile.mkdtemp())
logging.basicConfig(level=logging.DEBUG)
logging.info("Extracting '%s' to '%s'", args.wheel, temp_dir)
unpack(args.wheel, str(temp_dir))
logging.info(
"Adding DLLs from '%s' to package '%s'",
args.dll_dir,
package_name,
)
dll_dir = Path(args.dll_dir)
archive_path = temp_dir / f"{package_name}-{version_number}" / package_name
for local_path in dll_dir.glob("*.dll"):
logging.info("Copying '%s' to '%s'", local_path, archive_path)
shutil.copy(local_path, archive_path)
package_directory = temp_dir / f"{package_name}-{version_number}"
pack(str(package_directory), args.dest_dir, None)
ManimPango-0.6.0/packing/test_wheels.sh 0000664 0000000 0000000 00000000412 14671313014 0020036 0 ustar 00root root 0000000 0000000 #!/bin/bash
#test wheels in different directory
set -e
set -x
package=$1
FILE_PATH="`dirname \"$0\"`"
FILE_PATH="`( cd \"$FILE_PATH\" && pwd )`"
if [ -z "$FILE_PATH" ] ; then
exit 1
fi
cd $TMP
cp -r $package/tests tests
pytest -s tests
rm -r tests
cd $FILE_PATH
ManimPango-0.6.0/pyproject.toml 0000664 0000000 0000000 00000000542 14671313014 0016460 0 ustar 00root root 0000000 0000000 [build-system]
build-backend = "setuptools.build_meta"
requires = ["Cython>=3.0.2,<3.1", "setuptools>=59.2.0", "wheel"]
[tool.isort]
# from https://black.readthedocs.io/en/stable/compatible_configs.html
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
line_length = 88
ManimPango-0.6.0/requirements-dev.txt 0000664 0000000 0000000 00000000126 14671313014 0017602 0 ustar 00root root 0000000 0000000 pytest-cov>=4.0
pytest>=7.0.0,<8.0.0
Cython>=3.0.2
coverage>=7.3.2
setuptools>=59.2.0
ManimPango-0.6.0/setup.cfg 0000664 0000000 0000000 00000000260 14671313014 0015362 0 ustar 00root root 0000000 0000000 [metadata]
license_files =
LICENSE
LICENSE.*
[flake8]
max-line-length = 88
[tool:pytest]
testpaths =
tests
addopts = --cov --no-cov-on-fail --basetemp=.pytest_temp
ManimPango-0.6.0/setup.py 0000664 0000000 0000000 00000022127 14671313014 0015261 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
import argparse
import os
import shlex
import subprocess
import sys
import sysconfig
import warnings
from pathlib import Path
from shlex import quote
from subprocess import PIPE, Popen, check_call
from setuptools import Extension, setup
try:
from Cython.Build import cythonize
USE_CYTHON = True
except ImportError:
USE_CYTHON = False
# Below is a set of libraries which shouldn't be linked
# if we are using MSVC. Currently, pkg-config returns some of
# these libraries when building using conda.
IGNORE_LIBS_WIN = {"m", "c", "pthread", "dl", "rt"}
coverage = False
if sys.argv[-1] == "--coverage":
coverage = True
sys.argv.pop()
def get_version():
dic = {}
version_file = "manimpango/_version.py"
with open(version_file) as f:
exec(compile(f.read(), version_file, "exec"), dic)
return dic["__version__"]
NAME = "ManimPango"
MANIMPANGO_VERSION = get_version()
MINIMUM_PANGO_VERSION = "1.30.0"
DEBUG = False
if sys.platform == "win32" and sys.version_info >= (3, 14):
import atexit
atexit.register(
lambda: warnings.warn(
f"ManimPango {MANIMPANGO_VERSION} does not support Python "
f"{sys.version_info.major}.{sys.version_info.minor} and does not provide "
"prebuilt Windows binaries. We do not recommend building from source on "
"Windows.",
RuntimeWarning,
)
)
class RequiredDependencyException(Exception):
pass
NEEDED_LIBS = [
"pangocairo-1.0",
"pango-1.0",
"gobject-2.0",
"glib-2.0",
"intl",
"harfbuzz",
"cairo",
"fontconfig",
]
class PKG_CONFIG:
"""Preform operations with pkg-config.
Parameters
==========
libname : :class:`str`
The library name to query.
"""
def __init__(self, libname: str) -> None:
self.name = libname
self.pkg_config = os.environ.get("PKG_CONFIG", "pkg-config")
self.setup_argparse()
self.check_pkgconfig = self.check_pkgconfig()
def check_pkgconfig(self):
"""Check whether pkg-config works.
If it doesn't work raise a warning.
"""
try:
check_call([self.pkg_config, "--version"], stdout=subprocess.DEVNULL)
return True
except Exception:
warnings.warn(
f"{self.pkg_config} doesn't exists or doesn't seem to work\n"
"We assume that you give the compiler flags using\n"
"corresponding environment variables.",
RuntimeWarning,
)
return False
def parse_cflags(self, raw_cflags):
"""Parse the flags from pkg-config using argparse."""
raw_args = shlex.split(raw_cflags.strip())
args, unknown = self._cflag_parser.parse_known_args(raw_args)
config = {k: v or [] for k, v in args.__dict__.items()}
for i, x in enumerate(config["define_macros"]):
parts = x.split("=", 1)
value = x[1] or None if len(x) == 2 else None
config["define_macros"][i] = (parts[0], value)
return config, " ".join(quote(x) for x in unknown)
def setup_argparse(self):
_cflag_parser = argparse.ArgumentParser(add_help=False)
_cflag_parser.add_argument("-I", dest="include_dirs", action="append")
_cflag_parser.add_argument("-L", dest="library_dirs", action="append")
_cflag_parser.add_argument("-l", dest="libraries", action="append")
_cflag_parser.add_argument("-D", dest="define_macros", action="append")
_cflag_parser.add_argument("-R", dest="runtime_library_dirs", action="append")
self._cflag_parser = _cflag_parser
def check_min_version(self, version):
"""Check whether the library of that version exists."""
command = [
self.pkg_config,
"--print-errors",
"--atleast-version",
version,
self.name,
]
try:
check_call(command, stdout=subprocess.DEVNULL)
return True
except Exception:
raise RequiredDependencyException(f"{self.name} >= {version} is required")
@property
def libs(self):
"""Get distutils-compatible extension extras for the given library.
This requires ``pkg-config``.
"""
if self.check_pkgconfig:
name = self.name
command = self.pkg_config
try:
proc = Popen(
[command, "--libs", name],
stdout=PIPE,
stderr=PIPE,
)
except Exception:
pass
raw_libs, _ = proc.communicate()
known_libs, unknown_libs = self.parse_cflags(raw_libs.decode("utf8"))
if unknown_libs:
known_libs["extra_link_args"] = unknown_libs.split()
return known_libs
return dict()
@property
def cflags(self):
if self.check_pkgconfig:
name = self.name
command = self.pkg_config
try:
proc = Popen(
[command, "--cflags", name],
stdout=PIPE,
stderr=PIPE,
)
except Exception:
pass
raw_cflags, _ = proc.communicate()
known_cflags, unknown_cflags = self.parse_cflags(raw_cflags.decode("utf8"))
if unknown_cflags:
known_cflags["extra_compile_args"] = unknown_cflags.split()
return known_cflags
return dict()
@property
def setuptools_args(self):
return update_dict(self.libs, self.cflags)
def update_dict(dict1: dict, dict2: dict):
for key in dict1:
if key in dict2:
dict2[key] = dict1[key] + dict2[key]
else:
dict2[key] = dict1[key]
return dict2
ext = ".pyx" if USE_CYTHON else ".c"
base_file = Path(__file__).parent / "manimpango"
_pkg_config_pangocairo = PKG_CONFIG("pangocairo")
_pkg_config_fontconfig = PKG_CONFIG("pangofc")
if _pkg_config_pangocairo.check_pkgconfig:
_pkg_config_pangocairo.check_min_version(MINIMUM_PANGO_VERSION)
returns = update_dict(
_pkg_config_pangocairo.setuptools_args, _pkg_config_fontconfig.setuptools_args
)
else:
returns = {}
returns["libraries"] = NEEDED_LIBS
if sys.platform == "win32":
_pkg_config_pangowin32 = PKG_CONFIG("pangowin32")
returns = update_dict(returns, _pkg_config_pangowin32.setuptools_args)
returns["libraries"] += ["Gdi32", "User32", "Advapi32", "Shell32", "Ole32"]
if not sysconfig.get_platform().startswith("mingw"): # MSVC compilers
returns["libraries"] = list(
set(returns["libraries"]).difference(IGNORE_LIBS_WIN)
)
returns["extra_compile_args"] = ["-DCAIRO_WIN32_STATIC_BUILD"]
if hasattr(returns, "define_macros"):
returns["define_macros"] += [("UNICODE", 1)]
else:
returns["define_macros"] = [("UNICODE", 1)]
if coverage:
returns["define_macros"] += [("CYTHON_TRACE", 1)]
returns["define_macros"] += [("CYTHON_TRACE_NOGIL", 1)]
ext_modules = [
Extension(
"manimpango.cmanimpango",
[str(base_file / ("cmanimpango" + ext))],
**returns,
),
Extension(
"manimpango.enums",
[str(base_file / ("enums" + ext))],
**returns,
),
Extension(
"manimpango._register_font",
[str(base_file / ("_register_font" + ext))],
**returns,
),
]
if USE_CYTHON:
ext_modules = cythonize(
ext_modules,
language_level=3,
include_path=["manimpango"],
gdb_debug=DEBUG,
compiler_directives={"linetrace": coverage},
)
with open("README.md") as fh:
long_description = fh.read()
setup(
name=NAME,
version=MANIMPANGO_VERSION,
author="Naveen M K",
author_email="naveen@manim.community",
maintainer="The Manim Community Developers",
url="https://manimpango.manim.community/",
description="Bindings for Pango for using with Manim.",
long_description=long_description,
zip_safe=False,
long_description_content_type="text/markdown",
packages=["manimpango"],
python_requires=">=3.8",
platforms=["Linux", "macOS", "Windows"],
keywords=["cython", "pango", "cairo", "manim"],
license="MIT",
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3 :: Only",
"License :: OSI Approved :: MIT License",
"Programming Language :: Cython",
],
project_urls={
"Documentation": "https://manimpango.manim.community/",
"Source": "https://github.com/ManimCommunity/manimpango",
"Release notes": "https://github.com/ManimCommunity/ManimPango/releases/",
},
ext_modules=ext_modules,
package_data={
"manimpango": ["*.pxd", "*.pyx"],
},
)
ManimPango-0.6.0/tests/ 0000775 0000000 0000000 00000000000 14671313014 0014705 5 ustar 00root root 0000000 0000000 ManimPango-0.6.0/tests/__init__.py 0000664 0000000 0000000 00000001431 14671313014 0017015 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
import os
import platform
import shutil
from pathlib import Path
def set_dll_search_path():
# Python 3.8 no longer searches for DLLs in PATH, so we have to add
# everything in PATH manually.
if (
os.name != "nt"
or "GCC" in platform.python_compiler()
or not hasattr(os, "add_dll_directory")
):
return
for p in os.environ.get("PATH", "").split(os.pathsep):
try:
os.add_dll_directory(p)
except OSError:
pass
def delete_media_dir():
a = Path("media") # absolute to the running dir
if a.exists():
shutil.rmtree(a)
set_dll_search_path()
delete_media_dir()
CASES_DIR = Path(Path(__file__).parent, "cases").absolute()
FONT_DIR = Path(__file__).parent / "fonts"
ManimPango-0.6.0/tests/_manim.py 0000664 0000000 0000000 00000021713 14671313014 0016523 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
"""This file contains helpers for the tests copied and modified
from Manim.
"""
import copy
import os
import re
from pathlib import Path
from typing import Sequence
from manimpango import Alignment, MarkupUtils, TextSetting, text2svg
class MarkupText:
def __init__(
self,
text: str,
*,
size: int = 1,
line_spacing: int = None,
font: str = None,
slant: str = "NORMAL",
weight: str = "NORMAL",
tab_width: int = 4,
disable_ligatures: bool = False,
justify: bool = None,
indent: float = None,
alignment: Alignment = None,
# for the tests
filename: str = "test.svg",
wrap_text: bool = True,
**kwargs,
):
self.text = text
self.size = size
self.line_spacing = line_spacing
self.font = font
self.slant = slant
self.weight = weight
self.tab_width = tab_width
self.filename = filename
self.original_text = text
self.disable_ligatures = disable_ligatures
self.justify = justify
self.indent = indent
self.alignment = alignment
self.wrap_text = wrap_text
if MarkupUtils.validate(self.text):
raise ValueError(
f"Pango cannot parse your markup in {self.text}. "
"Please check for typos, unmatched tags or unescaped "
"special chars like < and &."
)
self.text2svg()
def text2svg(self):
"""Convert the text to SVG using Pango."""
size = self.size * 10
dir_name = Path(self.filename).parent
disable_liga = self.disable_ligatures
if not os.path.exists(dir_name):
os.makedirs(dir_name)
file_name = self.filename
if self.wrap_text:
return MarkupUtils.text2svg(
f"{self.text}",
self.font,
self.slant,
self.weight,
size,
True, # stray positional argument
disable_liga,
file_name,
20,
20,
600, # width
400, # height
justify=self.justify,
indent=self.indent,
line_spacing=self.line_spacing,
alignment=self.alignment,
)
else:
return MarkupUtils.text2svg(
f"{self.text}",
self.font,
self.slant,
self.weight,
size,
True, # stray positional argument
disable_liga,
file_name,
20,
20,
600, # width
400, # height
justify=self.justify,
indent=self.indent,
line_spacing=self.line_spacing,
alignment=self.alignment,
pango_width=-1,
)
# -1 for no wrapping
# default is full width and then wrap.
def __repr__(self):
return f"MarkupText({repr(self.original_text)})"
class Text:
def __init__(
self,
text: str,
fill_opacity: float = 1.0,
stroke_width: int = 0,
size: int = 1,
line_spacing: int = -1,
font: str = "",
slant: str = "NORMAL",
weight: str = "NORMAL",
gradient: tuple = None,
tab_width: int = 4,
disable_ligatures: bool = False,
filename: str = "text.svg",
color: str = "white",
**kwargs,
) -> None:
self.color = color
self.size = size
self.filename = filename
self.line_spacing = line_spacing
self.font = font
self.slant = slant
self.weight = weight
self.gradient = gradient
self.tab_width = tab_width
self.original_text = text
self.disable_ligatures = disable_ligatures
text_without_tabs = text
self.t2f = self.t2s = self.t2w = self.t2c = {}
if text.find("\t") != -1:
text_without_tabs = text.replace("\t", " " * self.tab_width)
self.text = text_without_tabs
if self.line_spacing == -1:
self.line_spacing = self.size + self.size * 0.3
else:
self.line_spacing = self.size + self.size * self.line_spacing
self.text2svg()
def _merge_settings(
self, left_setting: TextSetting, right_setting: TextSetting, args: Sequence[str]
) -> TextSetting:
contained = right_setting.end < left_setting.end
new_setting = copy.copy(left_setting) if contained else copy.copy(right_setting)
new_setting.start = right_setting.end if contained else left_setting.end
left_setting.end = right_setting.start
if not contained:
right_setting.end = new_setting.start
for arg in args:
left = getattr(left_setting, arg)
right = getattr(right_setting, arg)
default = getattr(self, arg)
if left != default and getattr(right_setting, arg) != default:
raise ValueError(
"Ambiguous style for text"
f"'{self.text[right_setting.start:right_setting.end]}':"
f"'{arg}' cannot be both '{left}' and '{right}'."
)
setattr(right_setting, arg, left if left != default else right)
return new_setting
def text2settings(self):
"""Internally used function. Converts the texts and styles
to a setting for parsing."""
settings = []
t2xs = [
(self.t2f, "font"),
(self.t2s, "slant"),
(self.t2w, "weight"),
(self.t2c, "color"),
]
t2xwords = {
*self.t2f.keys(),
*self.t2s.keys(),
*self.t2w.keys(),
*self.t2c.keys(),
}
for word in t2xwords:
setting_args = {
arg: t2x[word] if word in t2x else getattr(self, arg)
for t2x, arg in t2xs
}
for start, end in self.find_indexes(word, self.text):
settings.append(TextSetting(start, end, **setting_args))
# Handle overlaps
setting_args = {arg: getattr(self, arg) for _, arg in t2xs}
settings.sort(key=lambda setting: setting.start)
index = 0
for setting in settings:
index += 1
if index == len(settings):
break
next_setting = settings[index]
if setting.end > next_setting.start:
new_setting = self._merge_settings(setting, next_setting, setting_args)
new_index = index
while (
new_index < len(settings)
and settings[new_index].start < new_setting.start
):
new_index += 1
settings.insert(new_index, new_setting)
# Set all text settings (default font, slant, weight)
temp_settings = settings.copy()
start = 0
for setting in settings:
if setting.start != start:
temp_settings.append(TextSetting(start, setting.start, **setting_args))
start = setting.end
if start != len(self.text):
temp_settings.append(TextSetting(start, len(self.text), **setting_args))
settings = sorted(temp_settings, key=lambda setting: setting.start)
if re.search(r"\n", self.text):
line_num = 0
for start, end in self.find_indexes("\n", self.text):
for setting in settings:
if setting.line_num == -1:
setting.line_num = line_num
if start < setting.end:
line_num += 1
new_setting = copy.copy(setting)
setting.end = end
new_setting.start = end
new_setting.line_num = line_num
settings.append(new_setting)
settings.sort(key=lambda setting: setting.start)
break
for setting in settings:
if setting.line_num == -1:
setting.line_num = 0
return settings
def text2svg(self):
"""Internally used function.
Convert the text to SVG using Pango
"""
size = self.size * 10
line_spacing = self.line_spacing * 10
dir_name = Path(self.filename).parent
disable_liga = self.disable_ligatures
if not os.path.exists(dir_name):
os.makedirs(dir_name)
file_name = self.filename
settings = self.text2settings()
width = 600
height = 400
return text2svg(
settings,
size,
line_spacing,
disable_liga,
file_name,
30,
30,
width,
height,
self.text,
)
ManimPango-0.6.0/tests/cases/ 0000775 0000000 0000000 00000000000 14671313014 0016003 5 ustar 00root root 0000000 0000000 ManimPango-0.6.0/tests/cases/color_red.svg 0000664 0000000 0000000 00000007733 14671313014 0020506 0 ustar 00root root 0000000 0000000
ManimPango-0.6.0/tests/cases/hello_blue_world_green.svg 0000664 0000000 0000000 00000015201 14671313014 0023224 0 ustar 00root root 0000000 0000000
ManimPango-0.6.0/tests/cases/hello_blue_world_green_space.svg 0000664 0000000 0000000 00000015470 14671313014 0024407 0 ustar 00root root 0000000 0000000
ManimPango-0.6.0/tests/conftest.py 0000664 0000000 0000000 00000010434 14671313014 0017106 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
import sys
from textwrap import dedent
import pytest
import manimpango
def pytest_report_header(config):
return (
f"ManimPango version {manimpango.__version__}\n"
f"Pango version {manimpango.pango_version()}\n"
f"Cairo version {manimpango.cairo_version()}"
)
@pytest.fixture
def setup_fontconfig(tmpdir, monkeypatch):
if sys.platform.startswith("win32") and "GCC" not in sys.version:
default_fontconfig_configuration = dedent(
"""\
Default configuration fileWINDOWSFONTDIRfonts~/.fontsmonomonospacesans serifsans-serifsanssans-serifsystem uisystem-uiconf.dLOCAL_APPDATA_FONTCONFIG_CACHEfontconfig~/.fontconfig30
"""
)
with open(tmpdir / "fonts.conf", "w") as f:
f.write(default_fontconfig_configuration)
monkeypatch.setenv("FONTCONFIG_PATH", str(tmpdir))
monkeypatch.setenv("PANGOCAIRO_BACKEND", "fc")
ManimPango-0.6.0/tests/fonts/ 0000775 0000000 0000000 00000000000 14671313014 0016036 5 ustar 00root root 0000000 0000000 ManimPango-0.6.0/tests/fonts/AdobeVFPrototype.ttf 0000664 0000000 0000000 00000546710 14671313014 0021766 0 ustar 00root root 0000000 0000000 PBASEБ Э :DSIG ЂL GDEFXtч Ыl щGPOSD.р И АДGSUBГ l 0 HVARm\{ 0 џMVARb И vOS/2[ps; и `STATШф Ђќ ъavar"n$~ ЭX 4cmapЯмЉY dfvarв,*n ЂT ЈglyfpќR
є дgvarЛG Ѓш mаhead Х \ 6hheaVу $hmtxri. 8 тlocaKl7 tmaxpK е И nameЎыzІ Ш ЩpostY/е Е МQЦ_<ѕ ш иРK иРSџNџo ўБ ЋџNџNo 8 9 x
[ X KX ^ 2 ADBO @ ћкўђ O к P ъ P^ ( ё 3\ Fа Д (Q PQ И , 6 (, PG ё )ё Jё ,ё ,ё ё &ё (ё 2ё ,ё , P, : : B@ # t -x 0Ц -\ -C -Њ 0 -r -uџи -U - (п (У 0L -У 0 -ў (Z з (Ѓ С
y &