diff options
-rw-r--r-- | python/python3-uharfbuzz/README | 16 | ||||
-rw-r--r-- | python/python3-uharfbuzz/changelog | 23 | ||||
-rw-r--r-- | python/python3-uharfbuzz/example.py | 32 | ||||
-rw-r--r-- | python/python3-uharfbuzz/python3-uharfbuzz.SlackBuild | 23 | ||||
-rw-r--r-- | python/python3-uharfbuzz/python3-uharfbuzz.info | 8 |
5 files changed, 73 insertions, 29 deletions
diff --git a/python/python3-uharfbuzz/README b/python/python3-uharfbuzz/README index fca777472e23..287dfe61ca94 100644 --- a/python/python3-uharfbuzz/README +++ b/python/python3-uharfbuzz/README @@ -1 +1,17 @@ Streamlined Cython bindings for HarfBuzz shaping engine + +To check if it has installed properly you can run the +example program in the doc folder by +./example.py /path-to-font/font.ttf "Hello" + +It should give an output similar to this + +H gid43=0@1540,0+1540 +e gid72=1@1260,0+1260 +l gid79=2@569,0+569 +l gid79=3@569,0+569 +o gid82=4@1253,0+1253 + +You can view the example program in the upstream page +in this link +https://github.com/harfbuzz/uharfbuzz diff --git a/python/python3-uharfbuzz/changelog b/python/python3-uharfbuzz/changelog deleted file mode 100644 index d55e1bf68cde..000000000000 --- a/python/python3-uharfbuzz/changelog +++ /dev/null @@ -1,23 +0,0 @@ -Changelog for python3-uharfbuzz SlackBuild Script --------------------------------------------------------------------- - -10/06/2023: - -submitted to slackBuilds.org - -08/12/2023: - -Upgraded to version 0.37.3 -Thanks to Nikos Glotis for testing this version - -25/02/2024: - -Updated to version 0.39.0 - -24/05/20204: - -Updated to version 0.39.1 - -21/08/2024: - -Updated to version 0.39.3 diff --git a/python/python3-uharfbuzz/example.py b/python/python3-uharfbuzz/example.py new file mode 100644 index 000000000000..124b8644a178 --- /dev/null +++ b/python/python3-uharfbuzz/example.py @@ -0,0 +1,32 @@ +#!/usr/bin/python3 + +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 + glyph_name = font.glyph_to_string(gid) + cluster = info.cluster + x_advance = pos.x_advance + x_offset = pos.x_offset + y_offset = pos.y_offset + print(f"{glyph_name} gid{gid}={cluster}@{x_advance},{y_offset}+{x_advance}") diff --git a/python/python3-uharfbuzz/python3-uharfbuzz.SlackBuild b/python/python3-uharfbuzz/python3-uharfbuzz.SlackBuild index dfdc2b0978b7..2d7b338dbf90 100644 --- a/python/python3-uharfbuzz/python3-uharfbuzz.SlackBuild +++ b/python/python3-uharfbuzz/python3-uharfbuzz.SlackBuild @@ -22,10 +22,28 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#---------------------------Changelog-----------------------------------------# + +# 10/06/2023: submitted to slackBuilds.org + +# 08/12/2023: Upgraded to version 0.37.3 +# Thanks to Nikos Glotis for testing this version + +# 25/02/2024: Updated to version 0.39.0 + +# 24/05/20204: Updated to version 0.39.1 + +# 21/08/2024: Updated to version 0.39.3 + +# 11/09/2024: Updated to version 0.39.5 + + +#-------------------------------------------------------------------------------# + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=python3-uharfbuzz -VERSION=${VERSION:-0.39.3} +VERSION=${VERSION:-0.39.5} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -70,7 +88,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $SRCNAM-$VERSION -unzip $CWD/$SRCNAM-$VERSION.zip +tar xvf $CWD/$SRCNAM-$VERSION.tar.gz cd $SRCNAM-$VERSION @@ -89,6 +107,7 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION +install -Dvm 0644 $CWD/example.py -t $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 0644 {} \+ diff --git a/python/python3-uharfbuzz/python3-uharfbuzz.info b/python/python3-uharfbuzz/python3-uharfbuzz.info index b1a3e0c96820..ceb8ddeab1ea 100644 --- a/python/python3-uharfbuzz/python3-uharfbuzz.info +++ b/python/python3-uharfbuzz/python3-uharfbuzz.info @@ -1,10 +1,10 @@ PRGNAM="python3-uharfbuzz" -VERSION="0.39.3" +VERSION="0.39.5" HOMEPAGE="https://www.github.com/harfbuzz/uharfbuzz" -DOWNLOAD="https://pypi.io/packages/source/u/uharfbuzz/uharfbuzz-0.39.3.zip" -MD5SUM="7e780411630aa60a47e83928ed58f16c" +DOWNLOAD="https://pypi.io/packages/source/u/uharfbuzz/uharfbuzz-0.39.5.tar.gz" +MD5SUM="c93b126df0e7caa00f67c81c151db933" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="python3-build python3-wheel" +REQUIRES="python3-build python3-wheel python3-pkgconfig" MAINTAINER="Vijay Marcel" EMAIL="vijaymarcel@outlook.com" |