-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to generate metric xml file from ttf file #98
Comments
It shouldn't be that hard to write a python script in using |
thank you, calixteman, do you mean write a program to convert format? my question is: e.g. the code "33", height is "0.635971", I search through the generated .pl file, and cannot find any number close to "0.635xxx" (or "0.636xxx"). Or using ttx from fonttools can adjust the number itself? thanks! |
Hey, thanks for your answer. I am a maintainer of another JMathTeX successor project, WPF-Math. And I've asked the same question several years ago: #7. Unfortunately, we've got no definitive answer so far. FYI, I don't think that TTF files include all the required information, so perhaps we'll have to work with the original TFM files provided as the font source, to gather all the details. Also, some progress has been made by WPF-Math collaborators in comments to this issue: ForNeVeR/xaml-math#109. |
You're right, the old font file are still using tfm for metrics. |
@ForNeVeR You might be interested in https://github.com/opencollab/jlatexmath/tree/experimental - we've removed all the XML files (data moved to Enums etc) for smaller code / faster loading Also the code is structured to allow easy porting to other platforms (see desktop / share / web) so it may be possible to port with eg https://www.tangiblesoftwaresolutions.com/product_details/java_to_csharp_converter.html |
@murkle, thanks, I've taken a look at the branch. It doesn't still answer the question about how exactly the data was generated: it seems it was just moved from XML to Java files, and I wasn't able to find the script (or was there a script?) which may be used to extract the data from the |
I've read this issue, and issue below command to generate .pl file successfully, however, the result cannot be matched to the values from jlm_msbm10.xml, not only decimal place, but also the value itself, could you please kindly help me out? thanks.
PS C:\Program Files\MiKTeX\miktex\bin\x64> .\ttf2tfm.exe D:\tem\jlm_msbm10.ttf d:\tem\jlm_msbm10.tfm
PS C:\Program Files\MiKTeX\miktex\bin\x64> .\tftopl.exe D:\tem\jlm_msbm10.tfm D:\tem\jlm_msbm10.pl
the result are like:
(CHARACTER O 2
(CHARWD R 0.777)
(CHARHT R 0.646)
(CHARDP R 0.249)
)
(CHARACTER O 3
(CHARWD R 0.777)
(CHARHT R 0.836)
(CHARDP R 0.327)
)
(CHARACTER O 4
(CHARWD R 0.777)
(CHARHT R 0.836)
(CHARDP R 0.327)
)
but in the original file they are like (focus on values):
The text was updated successfully, but these errors were encountered: