servo / font-kit

A cross-platform font loading library written in Rust
Apache License 2.0
678 stars 100 forks source link

Avoid a permission error matching fonts under UWP. #156

Closed jdm closed 4 years ago

jdm commented 4 years ago

Fonts like "Times New Roman" resolve to a path like C:\WINDOWS\FONTS\TIMES NEW ROMAN.TTF. Strangely, UWP permits opening these paths, but not calling GetFinalPathNameByHandleW on a file handle that has been opened to it. The current code path is both inefficent (we use a path to open a file, then attempt to get the path again from that file handle) and broken, so when a path is available we can pass it directly to DirectWrite and avoid the entire problem.

pcwalton commented 4 years ago

@bors-servo: r+

bors-servo commented 4 years ago

:pushpin: Commit aabb621 has been approved by pcwalton

bors-servo commented 4 years ago

:hourglass: Testing commit aabb621cd3a02463334a9f101a1ba9c4548c785a with merge 54021d664b6c9f362d4f0bfbdd9e855581b44f99...

bors-servo commented 4 years ago

:sunny: Test successful - checks-travis Approved by: pcwalton Pushing 54021d664b6c9f362d4f0bfbdd9e855581b44f99 to master...