Ben,
You are correct. Setting the font parameters has no effect on the numbers returned these numbers are specific to the
font being used.
From what I can find, these values are unitless
UNTIL they are applied to the font size used. The numbers are usually given in UPM (units per eM) and, generally, a font will have a UPM that is a power of 2
(see this reference for more details) but that is not a requirement. Without knowing under what UPM the font is defined to be, the actual numbers given are not
precisely useful, but still can be used. The emphasis on
precisely is because the base UPM is unknown.
And, the line spacing parameter is undefined in libharu (although it might be determinable; I am not a font design expert). There is a HPDF_Page_SetTextLeading function() call and HPDF_Page_GetTextLeading(), but I can't find it documented in the Wiki. The references I found were in the code samples, and they did not reference a specific font in the function calls.
Line-to-line spacing is defined by the leading parameter (pronounced "ledding" from the days when the element lead was use to make fonts), which you have to accommodate when outputting your lines of text (not automatic in libharu, but this is a guess). One of the examples I have seen is for a 12 point Courier font, the leading was 15 points.
Specifically: For my application, the text size is specified in inches (0.18) which is 12.95993 points, and I'm using the same font as you are using. Since the baseline is used to determine the sign of the descender, we subtract the descender to get the total, which is defined at the same as the font size.
Using the definition from the link above, the 12.95993 = X * (629+426-(-157)) == X * 1212. Note that the "1212" value that is computed is not a power of 2, but that is not a requirement per the font standards.
Solving for X yields X=0.0106. Using this value, I can now crunch the text as tight as I wish at this "X" value point size by using this factor for my 12.95993 font.
Could I have done my crunching/spacing/etc. without the computation using the values from ascent etc.? Yes.
Bill