I am in the process of porting text measurement logic to our backend. (Related to rendering PDFs.)
I'm looking for suggestions on how someone might encode the data below (specifically the lines I'm sharing):
https://github.com/Hopding/standard-fonts/blob/master/font_metrics/Helvetica.afm#L25-L341
Example line:
C 32 ; WX 278 ; N space ; B 0 0 0 0 ;
Each key-value pair is separated by a semicolon. Because I may be measuring many lines/paragraphs of text, it needs to be fast to lookup by the first field (char code).
I was thinking maybe code-generation would be worth it in this case?