%global _empty_manifest_terminate_build 0 Name: python-uharfbuzz Version: 0.35.0 Release: 1 Summary: Streamlined Cython bindings for the harfbuzz shaping engine License: Apache License 2.0 URL: https://github.com/trufont/uharfbuzz Source0: https://mirrors.nju.edu.cn/pypi/web/packages/ad/f0/0b9203f0b239df7ae0028aa33f443d9f08888e2af119faf0f9559b752b13/uharfbuzz-0.35.0.zip %description [![Githun CI Status](https://github.com/harfbuzz/uharfbuzz/workflows/Build%20+%20Deploy/badge.svg)](https://github.com/harfbuzz/uharfbuzz/actions?query=workflow%3A%22Build+%2B+Deploy%22) [![PyPI](https://img.shields.io/pypi/v/uharfbuzz.svg)](https://pypi.org/project/uharfbuzz) ## uharfbuzz Streamlined Cython bindings for the [HarfBuzz][hb] shaping engine. ### Example ```python import sys import uharfbuzz as hb fontfile = sys.argv[1] text = sys.argv[2] blob = hb.Blob.from_file_path(fontfile) face = hb.Face(blob) font = hb.Font(face) buf = hb.Buffer() buf.add_str(text) buf.guess_segment_properties() features = {"kern": True, "liga": True} hb.shape(font, buf, features) infos = buf.glyph_infos positions = buf.glyph_positions for info, pos in zip(infos, positions): gid = info.codepoint cluster = info.cluster x_advance = pos.x_advance x_offset = pos.x_offset y_offset = pos.y_offset print(f"gid{gid}={cluster}@{x_advance},{y_offset}+{x_advance}") ``` ### How to make a release Use `git tag -a` to make a new annotated tag, or `git tag -s` for a GPG-signed annotated tag, if you prefer. Name the new tag with with a leading ‘v’ followed by three MAJOR.MINOR.PATCH digits, like in semantic versioning. Look at the existing tags for examples. In the tag message write some short release notes describing the changes since the previous tag. The subject line will be the release name and the message body will be the release notes. Finally, push the tag to the remote repository (e.g. assuming upstream is called origin): $ git push origin v0.4.3 This will trigger the CI to build the distribution packages and upload them to the Python Package Index automatically, if all the tests pass successfully. The CI will also automatically create a new Github Release and use the content of the annotated git tag for the release notes. [hb]: https://github.com/harfbuzz/harfbuzz %package -n python3-uharfbuzz Summary: Streamlined Cython bindings for the harfbuzz shaping engine Provides: python-uharfbuzz BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip BuildRequires: python3-cffi BuildRequires: gcc BuildRequires: gdb %description -n python3-uharfbuzz [![Githun CI Status](https://github.com/harfbuzz/uharfbuzz/workflows/Build%20+%20Deploy/badge.svg)](https://github.com/harfbuzz/uharfbuzz/actions?query=workflow%3A%22Build+%2B+Deploy%22) [![PyPI](https://img.shields.io/pypi/v/uharfbuzz.svg)](https://pypi.org/project/uharfbuzz) ## uharfbuzz Streamlined Cython bindings for the [HarfBuzz][hb] shaping engine. ### Example ```python import sys import uharfbuzz as hb fontfile = sys.argv[1] text = sys.argv[2] blob = hb.Blob.from_file_path(fontfile) face = hb.Face(blob) font = hb.Font(face) buf = hb.Buffer() buf.add_str(text) buf.guess_segment_properties() features = {"kern": True, "liga": True} hb.shape(font, buf, features) infos = buf.glyph_infos positions = buf.glyph_positions for info, pos in zip(infos, positions): gid = info.codepoint cluster = info.cluster x_advance = pos.x_advance x_offset = pos.x_offset y_offset = pos.y_offset print(f"gid{gid}={cluster}@{x_advance},{y_offset}+{x_advance}") ``` ### How to make a release Use `git tag -a` to make a new annotated tag, or `git tag -s` for a GPG-signed annotated tag, if you prefer. Name the new tag with with a leading ‘v’ followed by three MAJOR.MINOR.PATCH digits, like in semantic versioning. Look at the existing tags for examples. In the tag message write some short release notes describing the changes since the previous tag. The subject line will be the release name and the message body will be the release notes. Finally, push the tag to the remote repository (e.g. assuming upstream is called origin): $ git push origin v0.4.3 This will trigger the CI to build the distribution packages and upload them to the Python Package Index automatically, if all the tests pass successfully. The CI will also automatically create a new Github Release and use the content of the annotated git tag for the release notes. [hb]: https://github.com/harfbuzz/harfbuzz %package help Summary: Development documents and examples for uharfbuzz Provides: python3-uharfbuzz-doc %description help [![Githun CI Status](https://github.com/harfbuzz/uharfbuzz/workflows/Build%20+%20Deploy/badge.svg)](https://github.com/harfbuzz/uharfbuzz/actions?query=workflow%3A%22Build+%2B+Deploy%22) [![PyPI](https://img.shields.io/pypi/v/uharfbuzz.svg)](https://pypi.org/project/uharfbuzz) ## uharfbuzz Streamlined Cython bindings for the [HarfBuzz][hb] shaping engine. ### Example ```python import sys import uharfbuzz as hb fontfile = sys.argv[1] text = sys.argv[2] blob = hb.Blob.from_file_path(fontfile) face = hb.Face(blob) font = hb.Font(face) buf = hb.Buffer() buf.add_str(text) buf.guess_segment_properties() features = {"kern": True, "liga": True} hb.shape(font, buf, features) infos = buf.glyph_infos positions = buf.glyph_positions for info, pos in zip(infos, positions): gid = info.codepoint cluster = info.cluster x_advance = pos.x_advance x_offset = pos.x_offset y_offset = pos.y_offset print(f"gid{gid}={cluster}@{x_advance},{y_offset}+{x_advance}") ``` ### How to make a release Use `git tag -a` to make a new annotated tag, or `git tag -s` for a GPG-signed annotated tag, if you prefer. Name the new tag with with a leading ‘v’ followed by three MAJOR.MINOR.PATCH digits, like in semantic versioning. Look at the existing tags for examples. In the tag message write some short release notes describing the changes since the previous tag. The subject line will be the release name and the message body will be the release notes. Finally, push the tag to the remote repository (e.g. assuming upstream is called origin): $ git push origin v0.4.3 This will trigger the CI to build the distribution packages and upload them to the Python Package Index automatically, if all the tests pass successfully. The CI will also automatically create a new Github Release and use the content of the annotated git tag for the release notes. [hb]: https://github.com/harfbuzz/harfbuzz %prep %autosetup -n uharfbuzz-0.35.0 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-uharfbuzz -f filelist.lst %dir %{python3_sitearch}/* %files help -f doclist.lst %{_docdir}/* %changelog * Wed Apr 12 2023 Python_Bot - 0.35.0-1 - Package Spec generated