-
Notifications
You must be signed in to change notification settings - Fork 228
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
Add resvg.dll the new export function (interface to commad line option --list-fonts) and describe it in the resvg.h file. #763
Comments
resvg C API is limited to rendering by design. You cannot query much from it.
What do you mean by that? Fonts loaded from the system by resvg or font families present in an SVG file?
Not sure what this means either.
I work on this project when I feel like it. Period. |
I'm not really sure what are you trying to do. resvg uses the default SVG/CSS/WEB font resolving logic. It doesn't care how Windows handles font names. Meaning that you have to provide family names in a way SVG understands them. You cannot override that behaviour (sort of). Therefore I don't see how
I don't see how is this related to resvg. resvg doesn't interact with winapi at all. As for localized names, you should simply use EN names in SVG. |
Опишу ситуацию на более понятном нам обоим русском:
|
Well, I will rather not use that language... I think I understand now, but this feature is out of scope for resvg. I would suggest implementing a minimal TrueType parser for the As for |
I don’t need the complete typeface-name, I need the value that will be substituted into the font-family attribute. |
Support for localized names should not affect you in any way. You can always provide EN/US family name and it will work just fine. |
I have already given an example - in this font RESVG does not accept font values |
Ok, I understand now. Here is the current implementation. I know it's very convoluted, but this is how WEB works and we just have to deal with it.
TTF and OTF are largely the same thing. One uses |
A friend suggested that I make my own version of resvg with getting names, but this function has a memory leak, but I don’t know this programming language and can’t fix it.
|
It is possible. Just set
Yes, you need #[no_mangle]
pub extern "C" fn resvg_free_cstring(str: *mut c_char) {
unsafe {
let _ = CString::from_raw(str);
}
} Everything allocated in Rust have to be deallocated there as well. |
(In Windows, I don’t know about other systems) there is no API function for getting the font name from a file.
The result of a non-standard functions is often different from the name that RESVG uses.
First of all, I need a list of local (not installed on the system) font names.
PS I already asked for this feature in 2021...
The text was updated successfully, but these errors were encountered: