Pangocffi

Latest version: v0.12.0

Safety actively analyzes 619401 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.11.0

**Breaking Changes**

* Pango objects with matching setter and getter methods have been converted to properties. See 47. For example, with the `Layout` object:
* `layout.get_text()` is now `layout.text`
* `layout.set_text('Hi from Παν語')` is now `layout.text = 'Hi from Παν語'`
* `layout.get_pointer()` is now `layout.pointer`
* Note: For now, some computed properties are still named as `layout.get_size()` and `layout.get_line_count()`.
* `layout.set_markup()` has been renamed to `layout.apply_markup()`. 47

**Bug Fixes**

* `color.copy()` now correctly copies the blue component, instead of resetting to `0`. 47

**Internal Improvements**

* Tests are now run for Python 3.10. 43, 45
* Fixed GitHub Action tests for Windows. 45
* Fixed linting issue in `attr_list.py`. 45
* Added documentation on how to make contributions to pangocffi. 46
* Added full dev dependencies to `requirements.txt`. 46
* The GitHub Action for linting was extracted out of the build/test action to make contributions easier. 48
* Updated GitHub Action dependency versions. 48
* All Pango objects have been refactored as `PangoObject`. 47

0.10.0

**Breaking Changes**

* All `from_pointer()` methods in pangocffi by default will not apply a garbage collection callback. 42 **If you are using pangocairocffi, you will need to update to the latest version (v0.6.0) to avoid any potential issues.** This change is done mainly for consistency. If the original functionality is desired, adding `gc=True` should be enough (In other words, `from_pointer(pointer, gc=True)`). This affects the following methods:
* `Context.from_pointer()`
* `Layout.from_pointer()`

**Additions**

* Added setter methods for the properties of `Rectangle` and adds arguments to `__init__()` for setting the properties individually. 42

**Bug Fixes**

* Fixed an issue with `Attribute` in an `AttrList` causing segmentation faults when the list was being copied because the attribute was improperly being garbage collected. This was solved by simply removing the call to `ffi.gc(pointer, pango.pango_attribute_destroy)`. If there are any issues with this change, please raise an issue in the issue tracker. 42
* Fixed a mistake with `Attribute` where the `end_index` was incorrectly being set against the `start_index`. 42

0.9.0

**Breaking Changes**

* pangocffi now depends on GLib 2.0. It's very likely GLib is already installed since pangocffi already depended on GObject, but if not, pangocffi will raise an error on import. 28

**Additions**

* Added the following new classes. 28, 30
* `Attribute`
* `AttrList`
* `Color`
* Added new methods to `Layout`. 28, 30
* `set_attributes`
* `get_attributes`
* Added new enum `Underline`. 28
* Added the ability to configure loading a specific library via the following environment variables. 32
* `PANGO_LOCATION`
* `GLIB_LOCATION`
* `GOBJECT_LOCATION`

**Bug Fixes**

* Fixed issue with `Context.get_gravity_hint` calling the wrong pango function. 31

0.8.0

**Breaking Changes**

* C-FFI bindings are now generated at runtime, rather than at installation. See 21. This was done to avoid common installation issues like `ModuleNotFoundError: No module named 'pangocffi._generated'`. This change does mean the bindings are re-compiled the first time `import pangocffi` is called in a python session, but it takes less than a second to do this. If there are any issues with this change, please raise an issue in the issue tracker.
* Because of the aforementioned change, modules that depend on pangocffi's bindings being generated upon installation rather than at runtime, like pangocairocffi, will break. Either lock your version of pangocffi to 0.7.0 or upgrade the module to the latest version which is compatible with 0.8.0 of pangocffi.
* Support for Python 3.5 has been dropped because it has reached end-of-life. 21

0.7.0

**Additions**

* Added new methods to `Layout`. 19
* `set_wrap`
* `get_wrap`

0.6.0

* Added new methods to `Layout`
* `set_ellipsize`
* `get_ellipsize`

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.