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

[TextServer] Adds support for TrueType / OpenType collection files (*.TTC, *.OTC). #61772

Merged
merged 1 commit into from
Jun 13, 2022

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Jun 7, 2022

Adds support for importing TTC and OTC files, adds face_index import property as well as TextServer methods to select face index and get the number of faces.

Screen.Recording.2022-06-07.at.11.06.45.mov

face_index can be made selectable at runtime as a part of #61406 / #61473 if it's desired, but the primary goal of this change is implementing godotengine/godot-proposals#306 (in particular, significant part of macOS system fonts are shipped as TTC and OTC collections).

@bruvzg bruvzg added this to the 4.0 milestone Jun 7, 2022
@bruvzg bruvzg requested review from a team as code owners June 7, 2022 08:50
@fire
Copy link
Member

fire commented Jun 7, 2022

The feature proposal for this look wanted to support the Apple ecosystem.

Not that familiar with the Godot Engine font server.

@akien-mga akien-mga merged commit 136f84f into godotengine:master Jun 13, 2022
@akien-mga
Copy link
Member

Thanks!

@lmurray
Copy link

lmurray commented Jun 22, 2022

This PR introduced a 14% performance regression for editor startup, at least for me on Windows when using the fallback text server.

c:\src\games>hyperfine -iw2 -r10 "out\Godot_fonts.exe --quit pong\project.godot" "out\Godot_prev.exe --quit pong\project.godot"
Benchmark 1: out\Godot_fonts.exe --quit pong\project.godot
  Time (mean ± σ):      3.398 s ±  0.021 s    [User: 0.001 s, System: 0.003 s]
  Range (min … max):    3.373 s …  3.434 s    10 runs

  Warning: Ignoring non-zero exit code.

Benchmark 2: out\Godot_prev.exe --quit pong\project.godot
  Time (mean ± σ):      2.975 s ±  0.021 s    [User: 0.004 s, System: 0.004 s]
  Range (min … max):    2.942 s …  3.005 s    10 runs

  Warning: Ignoring non-zero exit code.

Summary
  'out\Godot_prev.exe --quit pong\project.godot' ran
    1.14 ± 0.01 times faster than 'out\Godot_fonts.exe --quit pong\project.godot'

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

Successfully merging this pull request may close these issues.

4 participants