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

Shipping and using DejaVu font on Ms-Windows #269

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file modified msw/pdprototype.tgz
Binary file not shown.
5 changes: 5 additions & 0 deletions tcl/pd-gui.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,11 @@ proc init_for_platform {} {
set ::cursor_editmode_resize "sb_h_double_arrow"
}
"win32" {
# Adding dejavu fonts on mswindows
package require twapi
twapi::AddFontResourceEx lib/DejaVuSansMono.ttf
twapi::AddFontResourceEx lib/DejaVuSansMono-Bold.ttf
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be protected by a catch clause.

if twapi isn't there (for whatever reasons), Pd is still perfectly usable, so there's little use in erroring out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My tcl is just trial and error, I'm not a programer. Could you do it? or tell me how to?

Anyway I have to commit a missing file on the "pdprototype.tgz" which is causing a Windows crash.

"pkgIndex.tcl"

I just did a build of this PR and got the error.

: - )

set ::modifier "Control"
option add *PatchWindow*Canvas.background "white" startupFile
# fix menu font size on Windows with tk scaling = 1
Expand Down