-
Notifications
You must be signed in to change notification settings - Fork 602
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
api: Add API to query available font families and styles #4523
api: Add API to query available font families and styles #4523
Conversation
Signed-off-by: peter.horvath <[email protected]>
Signed-off-by: peter.horvath <[email protected]>
Signed-off-by: peter.horvath <[email protected]>
/// [ 0 1 0 ] | ||
/// [ 1 -4 1 ] | ||
/// [ 0 1 0 ] | ||
/// | ||
ImageBuf OIIO_API laplacian (const ImageBuf &src, ROI roi={}, int nthreads=0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoa, what's up with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, my bad, I don't know what happened there. Fixed now.
Are you aware of the existing
Historically, we've tended to avoid adding new single-use API calls for individual queries, instead preferring to just add new tokens that getattribute recognizes to cover as many cases as possible. Your I'm not saying I'm necessarily set against doing it as functions as you have... but I wanted to give you the chance to consider sticking with the idiom we've been using, which I think has been successful in keeping ABI churn to a minimum. For functionality that's never really in a performance critical loop, it's really easy to add, remove, backport, or change the name or meaning of these tokens without any hard compatibility breaks, compared to the approach where a different set of exposed API functions is required. |
Signed-off-by: peter.horvath <[email protected]>
I don't mind switching to |
Signed-off-by: peter.horvath <[email protected]>
API functions are converted to the following
|
Signed-off-by: peter.horvath <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like! Thanks.
Because 3.0.0 is already marked as a release candidate, my goal is only to merge critical bug fixes for the final non-rc tag on Friday. So I'll merge this into main today, then backport it into the dev-3.0 branch after tagging on Friday, so technically this will be released as part of the next (3.0.1) patch release. If it's really important to you to get this in Friday's first 3.0.0 final release, then I can do it at essentially no real risk (since as far as public API, all this does is add some new getattribute query tokens and changes no other behavior, which was the whole point!). But if you can wait for 3.0.1 or operate from main for now, then I think it's better release policy to not add anything unnecessary once an RC is declared, no matter how harmless it appears. |
Waiting for 3.0.1 is perfectly fine for us. |
AcademySoftwareFoundation#4523) Add an API to query available fonts based on family and style name. The API can be used to build a UI where users can select a font from a list. They consist of new queries for `OIIO::getattribute()`: - `string font_family_list` A semicolon-separated list of all the font family names that OpenImageIO can find. - `string font_style_list:family` A semicolon-separated list of all the font style names that belong to the given font family. - `string font_filename:family:style` The font file (with full path) that defines the given font family and style. Fixes AcademySoftwareFoundation#4503. --------- Signed-off-by: peter.horvath <[email protected]>
AcademySoftwareFoundation#4523) Add an API to query available fonts based on family and style name. The API can be used to build a UI where users can select a font from a list. They consist of new queries for `OIIO::getattribute()`: - `string font_family_list` A semicolon-separated list of all the font family names that OpenImageIO can find. - `string font_style_list:family` A semicolon-separated list of all the font style names that belong to the given font family. - `string font_filename:family:style` The font file (with full path) that defines the given font family and style. Fixes AcademySoftwareFoundation#4503. --------- Signed-off-by: peter.horvath <[email protected]>
AcademySoftwareFoundation#4523) Add an API to query available fonts based on family and style name. The API can be used to build a UI where users can select a font from a list. They consist of new queries for `OIIO::getattribute()`: - `string font_family_list` A semicolon-separated list of all the font family names that OpenImageIO can find. - `string font_style_list:family` A semicolon-separated list of all the font style names that belong to the given font family. - `string font_filename:family:style` The font file (with full path) that defines the given font family and style. Fixes AcademySoftwareFoundation#4503. --------- Signed-off-by: peter.horvath <[email protected]>
AcademySoftwareFoundation#4523) Add an API to query available fonts based on family and style name. The API can be used to build a UI where users can select a font from a list. They consist of new queries for `OIIO::getattribute()`: - `string font_family_list` A semicolon-separated list of all the font family names that OpenImageIO can find. - `string font_style_list:family` A semicolon-separated list of all the font style names that belong to the given font family. - `string font_filename:family:style` The font file (with full path) that defines the given font family and style. Fixes AcademySoftwareFoundation#4503. --------- Signed-off-by: peter.horvath <[email protected]>
Description
Fixes #4503.
Add an API to query available fonts based on family and style name. The API can be used to build a UI where users can select a font from a list.
Checklist:
need to update the documentation, for example if this is a bug fix that
doesn't change the API.)
(adding new test cases if necessary).
corresponding Python bindings (and if altering ImageBufAlgo functions, also
exposed the new functionality as oiiotool options).
already run clang-format before submitting, I definitely will look at the CI
test that runs clang-format and fix anything that it highlights as being
nonconforming.