Hello there,
In trying to build the latest version of the library on Ubuntu 18.04 I get an error when compiling CGFont. Error is
/my/path/to/Silica/Sources/Silica/CGFont.swift:52:35: error: cannot assign value of type '_cairo_hint_metrics' to type 'FontHintMetrics'
options.hintMetrics = CAIRO_HINT_METRICS_OFF
^~~~~~~~~~~~~~~~~~~~~~
The specific part of the code is this in CGFont.swift, in the init() function:
...
let face = FontFace(fontConfigPattern: fontConfigPattern)
let options = FontOptions()
// TODO Does not compile...
options.hintMetrics = CAIRO_HINT_METRICS_OFF
...
The definition of FontOptions appears to be found in cairo.h, specifically struct _cairo_cont_options. Actually setting the hint metrics for a FontOptions appears to be defined in cairo.h, here:
Hello there, In trying to build the latest version of the library on Ubuntu 18.04 I get an error when compiling CGFont. Error is
The specific part of the code is this in CGFont.swift, in the init() function:
... let face = FontFace(fontConfigPattern: fontConfigPattern)
...
The definition of FontOptions appears to be found in cairo.h, specifically struct _cairo_cont_options. Actually setting the hint metrics for a FontOptions appears to be defined in cairo.h, here:
The hint metrics type along with member CAIRO_HINT_METRICS_OFF, appears to be in the same file, here:
If these definitions are all here and supported by the API then why should this error occur?