Skip to content

Add other textMetrics property #1784

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

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
and direct style, resulting in better performance when
no effect handler is installed
* Compiler/Runtime: Make resuming a continuation more efficient in js (#1765)
* Lib: Add other textMetrics property (#1784)

## Bug fixes
* Fix small bug in global data flow analysis (#1768)
Expand Down
28 changes: 28 additions & 0 deletions lib/js_of_ocaml/dom_html.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1998,7 +1998,35 @@ and canvasGradient = object
end

and textMetrics = object
method actualBoundingBoxAscent : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/actualBoundingBoxAscent *)

method actualBoundingBoxDescent : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/actualBoundingBoxDescent *)

method actualBoundingBoxLeft : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/actualBoundingBoxLeft *)

method actualBoundingBoxRight : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/actualBoundingBoxRight *)

method alphabeticBaseline : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/alphabeticBaseline *)

method fontBoundingBoxAscent : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/fontBoundingBoxAscent *)

method fontBoundingBoxDescent : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/fontBoundingBoxDescent *)

method hangingBaseline : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/hangingBaseline *)

method ideographicBaseline : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/ideographicBaseline *)

method width : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/width *)
end

and imageData = object
Expand Down
28 changes: 28 additions & 0 deletions lib/js_of_ocaml/dom_html.mli
Original file line number Diff line number Diff line change
Expand Up @@ -1809,7 +1809,35 @@ and canvasGradient = object
end

and textMetrics = object
method actualBoundingBoxAscent : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/actualBoundingBoxAscent *)

method actualBoundingBoxDescent : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/actualBoundingBoxDescent *)

method actualBoundingBoxLeft : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/actualBoundingBoxLeft *)

method actualBoundingBoxRight : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/actualBoundingBoxRight *)

method alphabeticBaseline : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/alphabeticBaseline *)

method fontBoundingBoxAscent : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/fontBoundingBoxAscent *)

method fontBoundingBoxDescent : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/fontBoundingBoxDescent *)

method hangingBaseline : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/hangingBaseline *)

method ideographicBaseline : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/ideographicBaseline *)

method width : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/width *)
end

and imageData = object
Expand Down
Loading