freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FreeType and Go/Golang


From: Hin-Tak Leung
Subject: FreeType and Go/Golang
Date: Thu, 3 Nov 2022 19:54:48 +0000 (UTC)

Hi,

I want/need to learn golang, so one thing that comes to mind is to try 
rewriting some of freetype2-demo in go. (some years ago, I wanted to check out 
pycairo, so I re-wrote all the freetype-py matplotlib-based drawing examples to 
draw with pycairo instead... similar idea)

I only have one small go program at the moment, one that loads FreeType and 
just ask for its version - found golang's support for interfacing C based 
libraries to be quite interesting: it can consume C includes directly. So in 
that sense, even easier than Python's ctypes module. 

    https://github.com/HinTak/freetype2-demos.go

The next thing to attempt is probably try writing a ftdump.go .

BTW, I found a partial incomplete rewrite of freetype in golang by the go team:

    https://github.com/golang/freetype

So apparently some people use it for pure-Go based font rendering.

Unfortunately, it is both functionally incomplete and also haven't been updated 
since about 2017. While there are a few examples (mostly about drawing), I am 
quite surprised that none of the examples even try to do basic font information 
like ftdump.

If I get any further,  I'd eventually probably create a go-binding for the 
FontVal backend. That would be the 4th non-C language binding, after 
C#/Python/Perl , and push a mirror over at:
    https://github.com/FontVal-extras/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]