Closed chrissimpkins closed 12 months ago
Thanks Chris. The avar axis miscount is more worrying, we should look into it. The STAT is kind of a known issue in that we don't populate any axis values but only build a stub, just like varLib does by default, without full support for DSv5 axis labels (norad I think still doesn't parse those so fontc doesn't read them yet).
We have in the CI a simple script that runs OTS on a simple font but maybe it's better to run it on a full blown font like GS to catch more real world errors
+1 to OTS the GS we build
Added OTS tests on the Roman and Italic files in https://github.com/googlefonts/fontc/pull/589
The current error and warning do not yield a non-zero exit status code so CI will pass. The tests show the same ERROR/WARNING report that is shown in the OP here.
reopening to investigate if we can get rid of the STAT warning as well
apparently OTS is complaining that we have a non-zero offsetToAxisValueOffsets despite the axisValueCount is 0:
if (this->axisValueCount == 0) {
if (this->offsetToAxisValueOffsets != 0) {
Warning("Unexpected non-zero offsetToAxisValueOffsets");
this->offsetToAxisValueOffsets = 0;
}
https://github.com/khaledhosny/ots/blob/be9445820c57ee12e738bd45b56f65648509682d/src/stat.cc#L91-L95
the generated_stat.rs looks like this?
/// Offset in bytes from the beginning of the STAT table to the
/// start of the design axes value offsets array. If axisValueCount
/// is zero, set to zero; if axisValueCount is greater than zero,
/// must be greater than zero.
pub offset_to_axis_values: OffsetMarker<Vec<OffsetMarker<AxisValue>>, WIDTH_32>,
Basically if the axis_values array is empty, we want the offset to be 0. Do we need to use a NullableOffsetMarker perhaps?
fontc source commit GS source commit
Fonts compiled in the default GH Actions Linux runner environment with the current stable Rust toolchain