[Pharo-project] Font lookup using styleName?
Hi everyone, I am using Pharo 1.3 and I am quite a newbie when it comes to Pharo so please be kind... I saw in the font chooser that Pharo supports font families with multiple styles. On my Mac for instance the font family Helvetica has the styles Light, Light Oblique, Regular, Oblique, Bold, and Bold Oblique. In the code font families are subinstances of FontFamilyAbstract and styles are subinstances of FontFamilyMemberAbstract. However, for creating fonts programmatically there seems to be no message which takes the style into account. There is LogicalFont class>>#familyName:pointSize:. How do I know which of the styles this uses? Then there is LogicalFont class>>#familyName:fallbackFamilyNames:pointSize:stretchValue:weightValue:slantValue:. How should I know which parameters I have to pass in to get a certain style? I would have expected a method like #familyName:styleName:pointSize: but I did not find one. Any idea why? Is this an omission or a feature? Cheers, Bernhard
On Nov 21, 2011, at 9:15 PM, Bernhard Pieber wrote:
Hi everyone,
I am using Pharo 1.3 and I am quite a newbie when it comes to Pharo so please be kindâ¦
we always are :) Seriously in fact :)
I saw in the font chooser that Pharo supports font families with multiple styles. On my Mac for instance the font family Helvetica has the styles Light, Light Oblique, Regular, Oblique, Bold, and Bold Oblique. In the code font families are subinstances of FontFamilyAbstract and styles are subinstances of FontFamilyMemberAbstract.
However, for creating fonts programmatically there seems to be no message which takes the style into account. There is LogicalFont class>>#familyName:pointSize:. How do I know which of the styles this uses?
Then there is LogicalFont class>>#familyName:fallbackFamilyNames:pointSize:stretchValue:weightValue:slantValue:. How should I know which parameters I have to pass in to get a certain style?
I would have expected a method like #familyName:styleName:pointSize: but I did not find one. Any idea why? Is this an omission or a feature?
probably an omission but I will wait to learn if somebody has the answer
Cheers, Bernhard
i'm not sure , but i think currently you have to create an instance of logical font, and then set it's emphasis i.e bold/italic etc. On 22 November 2011 09:19, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
On Nov 21, 2011, at 9:15 PM, Bernhard Pieber wrote:
Hi everyone,
I am using Pharo 1.3 and I am quite a newbie when it comes to Pharo so please be kindâ¦
we always are :) Seriously in fact :)
I saw in the font chooser that Pharo supports font families with multiple styles. On my Mac for instance the font family Helvetica has the styles Light, Light Oblique, Regular, Oblique, Bold, and Bold Oblique. In the code font families are subinstances of FontFamilyAbstract and styles are subinstances of FontFamilyMemberAbstract.
However, for creating fonts programmatically there seems to be no message which takes the style into account. There is LogicalFont class>>#familyName:pointSize:. How do I know which of the styles this uses?
Then there is LogicalFont class>>#familyName:fallbackFamilyNames:pointSize:stretchValue:weightValue:slantValue:. How should I know which parameters I have to pass in to get a certain style?
I would have expected a method like #familyName:styleName:pointSize: but I did not find one. Any idea why? Is this an omission or a feature?
probably an omission but I will wait to learn if somebody has the answer
Cheers, Bernhard
-- Best regards, Igor Stasenko.
Hi everyone, I have implemented a test for the missing method and the method itself. Before I can upload it I need to create an issue for the enhancement. In the tracker I am missing a template for a Pharo 1.3 Enhancement. Would you mind creating one? Or is it a policy that if someone who wants to contribute an enhancement has to use the unstable version, Pharo 1.4 in this case? Cheers, Bernhard Am 22.11.2011 um 08:19 schrieb Stéphane Ducasse:
On Nov 21, 2011, at 9:15 PM, Bernhard Pieber wrote:
Hi everyone,
I am using Pharo 1.3 and I am quite a newbie when it comes to Pharo so please be kindâ¦
we always are :) Seriously in fact :)
I saw in the font chooser that Pharo supports font families with multiple styles. On my Mac for instance the font family Helvetica has the styles Light, Light Oblique, Regular, Oblique, Bold, and Bold Oblique. In the code font families are subinstances of FontFamilyAbstract and styles are subinstances of FontFamilyMemberAbstract.
However, for creating fonts programmatically there seems to be no message which takes the style into account. There is LogicalFont class>>#familyName:pointSize:. How do I know which of the styles this uses?
Then there is LogicalFont class>>#familyName:fallbackFamilyNames:pointSize:stretchValue:weightValue:slantValue:. How should I know which parameters I have to pass in to get a certain style?
I would have expected a method like #familyName:styleName:pointSize: but I did not find one. Any idea why? Is this an omission or a feature?
probably an omission but I will wait to learn if somebody has the answer
Cheers, Bernhard
Hi Bernhard the idea is enh only go for the current alpha except if they are more than enh but really urgent freaky fixing a terribly broken aspect of a stable :). so go ahead and add a bug entry Stef On Nov 25, 2011, at 11:01 PM, Bernhard Pieber wrote:
Hi everyone,
I have implemented a test for the missing method and the method itself. Before I can upload it I need to create an issue for the enhancement. In the tracker I am missing a template for a Pharo 1.3 Enhancement. Would you mind creating one? Or is it a policy that if someone who wants to contribute an enhancement has to use the unstable version, Pharo 1.4 in this case?
Cheers, Bernhard
Am 22.11.2011 um 08:19 schrieb Stéphane Ducasse:
On Nov 21, 2011, at 9:15 PM, Bernhard Pieber wrote:
Hi everyone,
I am using Pharo 1.3 and I am quite a newbie when it comes to Pharo so please be kindâ¦
we always are :) Seriously in fact :)
I saw in the font chooser that Pharo supports font families with multiple styles. On my Mac for instance the font family Helvetica has the styles Light, Light Oblique, Regular, Oblique, Bold, and Bold Oblique. In the code font families are subinstances of FontFamilyAbstract and styles are subinstances of FontFamilyMemberAbstract.
However, for creating fonts programmatically there seems to be no message which takes the style into account. There is LogicalFont class>>#familyName:pointSize:. How do I know which of the styles this uses?
Then there is LogicalFont class>>#familyName:fallbackFamilyNames:pointSize:stretchValue:weightValue:slantValue:. How should I know which parameters I have to pass in to get a certain style?
I would have expected a method like #familyName:styleName:pointSize: but I did not find one. Any idea why? Is this an omission or a feature?
probably an omission but I will wait to learn if somebody has the answer
Cheers, Bernhard
participants (3)
-
Bernhard Pieber -
Igor Stasenko -
Stéphane Ducasse