-
Notifications
You must be signed in to change notification settings - Fork 194
implement a wrapper of CSS Font Loading API #1833
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
base: master
Are you sure you want to change the base?
Conversation
I don't understand this. What's missing for this to work ? |
|
||
method load : unit -> 'a meth | ||
|
||
method ready : bool readonly_prop |
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.
ready
should return a promise
|
||
method display : js_string t readonly_prop | ||
|
||
method src : js_string t readonly_prop |
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.
Where is this documented ?
method status : js_string t readonly_prop | ||
end | ||
|
||
val create_font_face : js_string t -> js_string t -> fontFaceElement t |
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.
Should we allow users to provide an optional descriptors as defined in https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace ?
It would help to have #2031 |
Summary
This PR partially adds a wrapper of CSS Font Loading API
This PR includes:
css_font_load.ml(i)
: actual implementation of the wrapperfonts
toDom_html.document
to returnFontFaceSet
examples/css_font_load
Note
Hi. This is my first PR on this repo. Let me know if anything is missing in this PR.
I didn't include a test for this feature because it seems the font loading API is not working on test codes in a straightforward manner (which may require stub or something of FontFaceSet)
Do you guys have any idea to handle this?