https://github.com/mvz/gir_ffi-pango
GirFFI-based bindings for Pango
https://github.com/mvz/gir_ffi-pango
gir-ffi gobject-introspection hacktoberfest pango ruby
Last synced: 10 months ago
JSON representation
GirFFI-based bindings for Pango
- Host: GitHub
- URL: https://github.com/mvz/gir_ffi-pango
- Owner: mvz
- License: lgpl-2.1
- Created: 2012-04-11T08:29:50.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2024-11-09T10:44:51.000Z (over 1 year ago)
- Last Synced: 2024-12-01T16:36:16.094Z (over 1 year ago)
- Topics: gir-ffi, gobject-introspection, hacktoberfest, pango, ruby
- Language: Ruby
- Homepage:
- Size: 181 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changelog.md
- License: COPYING.LIB
Awesome Lists containing this project
README
# GirFFI-Pango
GirFFI-based Ruby bindings for Pango
## Usage
```ruby
require "gir_ffi-gtk3"
require "gir_ffi-pango"
Gtk.init
win = Gtk::Window.new :toplevel
ctx = win.pango_context
fontmap = ctx.font_map
fd = Pango::FontDescription.new
fd.family = "Sans"
fnt = fontmap.load_font ctx, fd
puts fnt.describe.to_string
lang = Pango::Language.from_string "en"
puts lang.scripts.to_a
```
## Install
```bash
gem install gir_ffi-pango
```
## Requirements
This gem depends on the [GirFFI](https://rubygems.org/gems/gir_ffi) gem and
its requirements. In addition, it needs introspection data for the
pango library.
On Debian and Ubuntu, you can get this by installing `gir1.2-pango-1.0`.
This gem has not been tested on Mac OS X or Microsoft Windows. YMMV. Pull
requests to support these platforms are welcome.
## License
Copyright © 2012–2016, 2018–2024, [Matijs van Zuijlen](http://www.matijs.net/)
GirFFI-Pango is free software, distributed under the terms of the GNU Lesser
General Public License, version 2.1 or later. See the file COPYING.LIB for more
information.