I am using Pharo 3.0 and I want to experiment
with Unicode Fonts; however, I am running into trouble getting a
instance of the font for use with the selector font:. I
can use the FreeTypeSelectionWindow to select the font I want,
namely: FreeTypeFont('Cambria Math' 'Regular' 10). I do this by
creating an instance of that Dialog and inspecting it. The inspector
is of little use because the Dialog is no modal, i.e., it does not
force a return. I can, however, perform the selection of the
desired font which updates the inspector and then I can open an
inspector on the realFont instance variable. While this tortured
trail lead me to my answer the problem is still not solved. There
are three solutions to my problem, namely: either the selection
window can be made modal or there is a method that will take the
parameters, FreeTypeFont, 'Cambria Math', 'Regular' and the
pointSize 10, and will return a instance of the font, or the
drawing method of the string accepts those parameters.
Any help will be greatly appreciated, I hope to gain enough knowledge to document the proper use of Unicode. I need to understand it so I can create a math formula equation editor. Thanks to those that have answered my previous questions. |
Sorry, I don’t have a any time now, all I can give you is a script I use to set different fonts on Pharo start https://gist.github.com/Uko/7672537#file-fonts-st
It’s a script initially implemented by Doru. Cheers Uko On 04 Feb 2014, at 19:57, Bob Williams <[hidden email]> wrote:
|
On 04 Feb 2014, at 20:00, Yuriy Tymchuk <[hidden email]> wrote: > Sorry, I don’t have a any time now, all I can give you is a script I use to set different fonts on Pharo start https://gist.github.com/Uko/7672537#file-fonts-st > It’s a script initially implemented by Doru. This is what I do: #('SourceCodeProRegular' 'SourceCodeProBold' 'SourceSansProRegular' 'SourceSansProBold') do: [ :each | Smalltalk globals at: each asSymbol ifAbsent: [ Gofer new smalltalkhubUser: 'girba' project: 'FreeFonts'; package: each; load ]. (Smalltalk at: each asSymbol) new install ]. FreeTypeSystemSettings loadFt2Library: true. FreeTypeFontProvider current updateFromSystem. StandardFonts setAllStandardFontsTo: (LogicalFont familyName: 'Source Sans Pro' pointSize: 12); haloFont: (LogicalFont familyName: 'Source Sans Pro' pointSize: 9); windowTitleFont: (LogicalFont familyName: 'Source Sans Pro Bold' pointSize: 12); balloonFont: (LogicalFont familyName: 'Source Sans Pro' pointSize: 9); codeFont: (LogicalFont familyName: 'Source Code Pro' pointSize: 11). Also by our Swiss friend ;-) http://ws.stfx.eu/IX85BRN217VD?format=html > Cheers > Uko > > On 04 Feb 2014, at 19:57, Bob Williams <[hidden email]> wrote: > >> I am using Pharo 3.0 and I want to experiment with Unicode Fonts; however, I am running into trouble getting a instance of the font for use with the selector font:. I can use the FreeTypeSelectionWindow to select the font I want, namely: FreeTypeFont('Cambria Math' 'Regular' 10). I do this by creating an instance of that Dialog and inspecting it. The inspector is of little use because the Dialog is no modal, i.e., it does not force a return. I can, however, perform the selection of the desired font which updates the inspector and then I can open an inspector on the realFont instance variable. While this tortured trail lead me to my answer the problem is still not solved. There are three solutions to my problem, namely: either the selection window can be made modal or there is a method that will take the parameters, FreeTypeFont, 'Cambria Math', 'Regular' and the pointSize 10, and will return a instance of the font, or the drawing method of the string accepts those parameters. >> >> Any help will be greatly appreciated, I hope to gain enough knowledge to document the proper use of Unicode. I need to understand it so I can create a math formula equation editor. >> >> Thanks to those that have answered my previous questions. > |
Free forum by Nabble | Edit this page |