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
Conversation
This is for loading dejavu font on Ms-Windows
as I find little use in having to click another time to see what this PR is about, I copy it here verbatim: This is intended for Miller's builds on ms-windows adding the fonts and TWAPI to his compressed files on "pdprototype.tgz" that is included on the [MSW folder](https://github.com/pure-data/pure-data/tree/master/msw of the Pd-sources Decompressing "pdprototype.tgz" we get a lot of ingredients on the cake and we are adding a couple of cherrys to it on the "lib" folder:
Then we add this lines to "pd-gui.tcl" just below "win32" for the proc init_for_platform {} at the time of writing on line 365: Adding dejavu fonts on mswindowspackage require twapi This pd-gui.tcl does not crash other OS but will crash Windows if TWAPI is not there. I've tested it and the crash nicely reports the offending line of pd-gui.tcl. This will deploy Dejavu font on the ZIP version and also the Installer version. I can't test the latter. It is easy to implement and very easy to throw away if no longer needed. |
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.
please catch any errors.
tcl/pd-gui.tcl
Outdated
package require twapi | ||
twapi::AddFontResourceEx lib/DejaVuSansMono.ttf | ||
twapi::AddFontResourceEx lib/DejaVuSansMono-Bold.ttf | ||
# |
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.
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.
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.
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.
: - )
Ok I added a catch clause and other stuff to pd-gui.tcl and changes to “pdprototype.tgz” Now the font files are placed on the pd/bin directory. |
this might just be nitpicking, but if I were to accept the PR, I'd suggest you don't change both source-code (the tcl-file) and opaque binaries (the tgz) in a single commit. (but then: the PR must be accepted by miller not me - he might think differently) |
I hope so because I can't figure out how to undone the commits (I'm rather new to GIT). Can you review the changes you requested? |
This PR is fully described here:
http://lucarda.com.ar/x/dejavu/readme.html