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

hb_blob_create_from_file return the same thing when a file is not found or empty #2567

Closed
ebraminio opened this issue Jul 14, 2020 · 1 comment
Assignees

Comments

@ebraminio
Copy link
Collaborator

ebraminio commented Jul 14, 2020

Can you open an issue please? I have ideas.

1339351#r40599376

Guess you are referring to this issue, honestly I like this uniform property of harfbuzz APIs as we even see a file system with the idea but I like to hear about what you are proposing.

@behdad
Copy link
Member

behdad commented Jun 4, 2021

I suggest we add a hb_blob_create_from_file_or_fail() variant that returns nullptr if file can't be opened.

@behdad behdad self-assigned this Jun 4, 2021
behdad added a commit that referenced this issue Jun 14, 2021
Fixes #2567

New API:
+hb_blob_create_or_fail()
+hb_blob_create_from_file_or_fail()

Use these in util/ to distinguish empty file from not-found file.
Only err on the latter.
behdad added a commit that referenced this issue Jun 14, 2021
Fixes #2567

New API:
+hb_blob_create_or_fail()
+hb_blob_create_from_file_or_fail()

Use these in util/ to distinguish empty file from not-found file.
Only err on the latter.
@behdad behdad closed this as completed in bdfed8f Jun 15, 2021
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 a pull request may close this issue.

2 participants