Skip to content
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

fix: file extensions in loadFontsFromDir() are no longer case-sensitive #707

Merged
merged 1 commit into from
Aug 21, 2023

Conversation

yisibl
Copy link
Collaborator

@yisibl yisibl commented Aug 4, 2023

Fixed: #704

@yisibl yisibl force-pushed the fix-font-ext branch 6 times, most recently from 04cdb2e to d5173d3 Compare August 4, 2023 16:53
@yisibl yisibl force-pushed the fix-font-ext branch 2 times, most recently from e130387 to 7dd4193 Compare August 17, 2023 16:21
@yisibl yisibl changed the title fix: fonts with uppercase extensions are not recognized fix: file extensions in loadFontsFromDir() are no longer case-sensitive Aug 20, 2023
@yisibl yisibl marked this pull request as ready for review August 20, 2023 15:04
@Brooooooklyn Brooooooklyn merged commit efa95a4 into main Aug 21, 2023
27 checks passed
@Brooooooklyn Brooooooklyn deleted the fix-font-ext branch August 21, 2023 10:00
@@ -44,6 +44,9 @@ pub mod GlobalFonts {
Ok(font.register(font_data.as_ref(), maybe_name_alias))
}

// TODO: Do file extensions in font_path need to be converted to lowercase?
// Windows and macOS are case-insensitive, Linux is not.
// See: https://github.com/Brooooooklyn/canvas/actions/runs/5893418006/job/15985737723
#[napi]
pub fn register_from_path(font_path: String, name_alias: Option<String>) -> Result<bool> {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Brooooooklyn 这个方法中扩展名需要转换为小写吗?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我觉得先不用, 看看发布之后的情况需不需要加

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的呀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uppercase font suffixes not recognized on Linux/Mac
2 participants