Summary: | Add font-file hash? | ||
---|---|---|---|
Product: | fontconfig | Reporter: | Behdad Esfahbod <freedesktop> |
Component: | library | Assignee: | Akira TAGOH <akira> |
Status: | RESOLVED FIXED | QA Contact: | Behdad Esfahbod <freedesktop> |
Severity: | normal | ||
Priority: | medium | CC: | akira, fontconfig-bugs, freedesktop |
Version: | 2.7 | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Behdad Esfahbod
2012-06-05 07:53:31 UTC
Right, the important part is that which hashing algorithm is used can be changed over time, which may mean including the algorithm name in the data with the hash value. proposed implementation for this feature: http://cgit.freedesktop.org/~tagoh/fontconfig/commit/?h=bz50733 In this proposal, I just added the hash value as string. wondering if I should add it as the array of Integer or kind of FcHash? sample output... $ ./fc-query/fc-query /usr/share/fonts/vlgothic/VL-Gothic-Regular.ttf | grep hash hash: "26f470356f6130e802bafea3b23805cf59b83cb60c566bb982792c6ad3d73306"(s) $ sha256sum /usr/share/fonts/vlgothic/VL-Gothic-Regular.ttf 26f470356f6130e802bafea3b23805cf59b83cb60c566bb982792c6ad3d73306 /usr/share/fonts/vlgothic/VL-Gothic-Regular.ttf String is adequate. Perhaps prepend the string with "sha256:"? I think you can also get rid of some of the internal API. Just have a function that returns a string that has the hash type and the hash itself. No need for differentiating the type in the library really. Thanks for the comment. cleaned up and improved. looks like this: $ ./fc-query/fc-query /usr/share/fonts/vlgothic/VL-Gothic-Regular.ttf | grep hash hash: "sha256:26f470356f6130e802bafea3b23805cf59b83cb60c566bb982792c6ad3d73306"(s) Looks good to me. Lets get in. Thanks for the review. merged into master. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.