how to use dejavu bitmap fonts

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

how to use dejavu bitmap fonts

Tudor Girba
Hi,

I am trying to use the DejaVuBitmapFonts, but I do not know how to install them. I tried the following:

Gofer it
        squeaksource: 'DejaVu';
        package: 'DejaVuBitmapFonts';
        load.

DejaVuHolder installFull.

However, this creates a problem in using TextConstants. Can anyone help?

Cheers,
Doru


--
www.tudorgirba.com

"One cannot do more than one can do."




Reply | Threaded
Open this post in threaded view
|

Re: how to use dejavu bitmap fonts

Stéphane Ducasse
The package should be updated to 1.2.

It should declare fonts probably in one of the classVar of the TextConstant SharedPool.
Probably
        TextSharedInformation have a look.

In 1.2 we cleaned the last global poolvar = textConstant which was used as a pool but also as a repository to plug anything inside
instead of specific classVariable in adequate classes. It was a good plate of spaghettis code.

I know that benjamin wants to take some times to do another pass and move the left over to the class they belongs to but it will
take some time.

Stef

On Jan 31, 2011, at 9:52 PM, Tudor Girba wrote:

> Hi,
>
> I am trying to use the DejaVuBitmapFonts, but I do not know how to install them. I tried the following:
>
> Gofer it
> squeaksource: 'DejaVu';
> package: 'DejaVuBitmapFonts';
> load.
>
> DejaVuHolder installFull.
>
> However, this creates a problem in using TextConstants. Can anyone help?
>
> Cheers,
> Doru
>
>
> --
> www.tudorgirba.com
>
> "One cannot do more than one can do."
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: how to use dejavu bitmap fonts

Tudor Girba
I took a look, but I do not know what to do :(. Can anyone else provide some more specific directions?

Cheers,
Doru


On 31 Jan 2011, at 22:00, Stéphane Ducasse wrote:

> The package should be updated to 1.2.
>
> It should declare fonts probably in one of the classVar of the TextConstant SharedPool.
> Probably
> TextSharedInformation have a look.
>
> In 1.2 we cleaned the last global poolvar = textConstant which was used as a pool but also as a repository to plug anything inside
> instead of specific classVariable in adequate classes. It was a good plate of spaghettis code.
>
> I know that benjamin wants to take some times to do another pass and move the left over to the class they belongs to but it will
> take some time.
>
> Stef
>
> On Jan 31, 2011, at 9:52 PM, Tudor Girba wrote:
>
>> Hi,
>>
>> I am trying to use the DejaVuBitmapFonts, but I do not know how to install them. I tried the following:
>>
>> Gofer it
>> squeaksource: 'DejaVu';
>> package: 'DejaVuBitmapFonts';
>> load.
>>
>> DejaVuHolder installFull.
>>
>> However, this creates a problem in using TextConstants. Can anyone help?
>>
>> Cheers,
>> Doru
>>
>>
>> --
>> www.tudorgirba.com
>>
>> "One cannot do more than one can do."
>>
>>
>>
>>
>
>

--
www.tudorgirba.com

"In a world where everything is moving ever faster,
one might have better chances to win by moving slower."




Reply | Threaded
Open this post in threaded view
|

Re: how to use dejavu bitmap fonts

Alain Plantec-3
Le 31/01/2011 22:27, Tudor Girba a écrit :
> I took a look, but I do not know what to do :(. Can anyone else provide some more specific directions?
Hi Doru,
I've take a look and I think I've fixed it.
Unfortunately the network is much too slow here for this BIG package.
You can simply fix it by yourself locally (before it is uploaded on
squeaksource).
Just edit DejaVuHolder class >> #installSizes:
and set it to:

installSizes: aListOfInteger
     "self installSizes: #(7 8 9 10 11 12 13 14 24)"
     TextConstants TextSharedInformation
         at: self fontName
         put: (TextStyle fontArray: (self loadFromStructuresList:  (self
fontStructureNamesForSizes: aListOfInteger))).
     StrikeFont useUnderscoreIfOver1bpp.

I've tried it very quickly, hope it is enough...

Cheers
Alain


> Cheers,
> Doru
>
>
> On 31 Jan 2011, at 22:00, Stéphane Ducasse wrote:
>
>> The package should be updated to 1.2.
>>
>> It should declare fonts probably in one of the classVar of the TextConstant SharedPool.
>> Probably
>> TextSharedInformation have a look.
>>
>> In 1.2 we cleaned the last global poolvar = textConstant which was used as a pool but also as a repository to plug anything inside
>> instead of specific classVariable in adequate classes. It was a good plate of spaghettis code.
>>
>> I know that benjamin wants to take some times to do another pass and move the left over to the class they belongs to but it will
>> take some time.
>>
>> Stef
>>
>> On Jan 31, 2011, at 9:52 PM, Tudor Girba wrote:
>>
>>> Hi,
>>>
>>> I am trying to use the DejaVuBitmapFonts, but I do not know how to install them. I tried the following:
>>>
>>> Gofer it
>>> squeaksource: 'DejaVu';
>>> package: 'DejaVuBitmapFonts';
>>> load.
>>>
>>> DejaVuHolder installFull.
>>>
>>> However, this creates a problem in using TextConstants. Can anyone help?
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "One cannot do more than one can do."
>>>
>>>
>>>
>>>
>>
> --
> www.tudorgirba.com
>
> "In a world where everything is moving ever faster,
> one might have better chances to win by moving slower."
>
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: how to use dejavu bitmap fonts

Nicolas Cellier
In reply to this post by Stéphane Ducasse
2011/1/31 Stéphane Ducasse <[hidden email]>:

> The package should be updated to 1.2.
>
> It should declare fonts probably in one of the classVar of the TextConstant SharedPool.
> Probably
>        TextSharedInformation have a look.
>
> In 1.2 we cleaned the last global poolvar = textConstant which was used as a pool but also as a repository to plug anything inside
> instead of specific classVariable in adequate classes. It was a good plate of spaghettis code.
>
> I know that benjamin wants to take some times to do another pass and move the left over to the class they belongs to but it will
> take some time.
>
> Stef
>

Nice effort to clean this up.
Among the so called "Constants", I remember browsing one recently :
(TextConstants at: #pixelsPerInch).
Uh, this one should be device dependent, shouldn't it ?

No, 96 seems the only figures written in the stone, and you'll hardly
find any other thing but this default value in a Squeak image.
Moreover, if you analyze Squeak code, you'll see some hardcoded 96 DPI
here and there.
Hope Pharo will give a kick in the anthill (literal translation of a
french saying).

Nicolas

Reply | Threaded
Open this post in threaded view
|

Re: how to use dejavu bitmap fonts

Stéphane Ducasse
>
>> The package should be updated to 1.2.
>>
>> It should declare fonts probably in one of the classVar of the TextConstant SharedPool.
>> Probably
>>        TextSharedInformation have a look.
>>
>> In 1.2 we cleaned the last global poolvar = textConstant which was used as a pool but also as a repository to plug anything inside
>> instead of specific classVariable in adequate classes. It was a good plate of spaghettis code.
>>
>> I know that benjamin wants to take some times to do another pass and move the left over to the class they belongs to but it will
>> take some time.
>>
>> Stef
>>
>
> Nice effort to clean this up.
> Among the so called "Constants", I remember browsing one recently :
> (TextConstants at: #pixelsPerInch).
> Uh, this one should be device dependent, shouldn't it ?
>
> No, 96 seems the only figures written in the stone, and you'll hardly
> find any other thing but this default value in a Squeak image.
> Moreover, if you analyze Squeak code, you'll see some hardcoded 96 DPI
> here and there.
> Hope Pharo will give a kick in the anthill (literal translation of a
> french saying).

Join and help. There are a lot of things that are like that.


>
> Nicolas
>


Reply | Threaded
Open this post in threaded view
|

Re: how to use dejavu bitmap fonts

Stéphane Ducasse
In reply to this post by Alain Plantec-3

> Hi Doru,
> I've take a look and I think I've fixed it.
> Unfortunately the network is much too slow here for this BIG package.
> You can simply fix it by yourself locally (before it is uploaded on squeaksource).
> Just edit DejaVuHolder class >> #installSizes:
> and set it to:
>
> installSizes: aListOfInteger
>    "self installSizes: #(7 8 9 10 11 12 13 14 24)"
>    TextConstants TextSharedInformation
>        at: self fontName
>        put: (TextStyle fontArray: (self loadFromStructuresList:  (self fontStructureNamesForSizes: aListOfInteger))).
>    StrikeFont useUnderscoreIfOver1bpp.

Yes this should be it.

Doru TextConstants was a dictionary containing poolVariables (old abstractions) AND values that people just added
as global dictionary. What we did was to define the fixed part of TextConstant = the poolVariables as a real SharedPool and the rest
the shitty part (where all the system register things in this nice global variables (instead of using adequate class variables)) is now in
the classVariable TextSharedInformation of TextConstants

Stef
Reply | Threaded
Open this post in threaded view
|

Re: how to use dejavu bitmap fonts

Benjamin Van Ryseghem (Pharo)
If it's still not working, I can have a look if you want :)


Ben

On Feb 1, 2011, at 7:07 AM, Stéphane Ducasse wrote:

>
>> Hi Doru,
>> I've take a look and I think I've fixed it.
>> Unfortunately the network is much too slow here for this BIG package.
>> You can simply fix it by yourself locally (before it is uploaded on squeaksource).
>> Just edit DejaVuHolder class >> #installSizes:
>> and set it to:
>>
>> installSizes: aListOfInteger
>>   "self installSizes: #(7 8 9 10 11 12 13 14 24)"
>>   TextConstants TextSharedInformation
>>       at: self fontName
>>       put: (TextStyle fontArray: (self loadFromStructuresList:  (self fontStructureNamesForSizes: aListOfInteger))).
>>   StrikeFont useUnderscoreIfOver1bpp.
>
> Yes this should be it.
>
> Doru TextConstants was a dictionary containing poolVariables (old abstractions) AND values that people just added
> as global dictionary. What we did was to define the fixed part of TextConstant = the poolVariables as a real SharedPool and the rest
> the shitty part (where all the system register things in this nice global variables (instead of using adequate class variables)) is now in
> the classVariable TextSharedInformation of TextConstants
>
> Stef


Reply | Threaded
Open this post in threaded view
|

Re: how to use dejavu bitmap fonts

Marcus Denker-4
In reply to this post by Stéphane Ducasse

On Feb 1, 2011, at 11:02 AM, Benjamin wrote:

> If it's still not working, I can have a look if you want :)
>

We should integrate that into 1.3 soon...

>
> Ben
>
> On Feb 1, 2011, at 7:07 AM, Stéphane Ducasse wrote:
>
>>
>>> Hi Doru,
>>> I've take a look and I think I've fixed it.
>>> Unfortunately the network is much too slow here for this BIG package.
>>> You can simply fix it by yourself locally (before it is uploaded on squeaksource).
>>> Just edit DejaVuHolder class >> #installSizes:
>>> and set it to:
>>>
>>> installSizes: aListOfInteger
>>>  "self installSizes: #(7 8 9 10 11 12 13 14 24)"
>>>  TextConstants TextSharedInformation
>>>      at: self fontName
>>>      put: (TextStyle fontArray: (self loadFromStructuresList:  (self fontStructureNamesForSizes: aListOfInteger))).
>>>  StrikeFont useUnderscoreIfOver1bpp.
>>
>> Yes this should be it.
>>
>> Doru TextConstants was a dictionary containing poolVariables (old abstractions) AND values that people just added
>> as global dictionary. What we did was to define the fixed part of TextConstant = the poolVariables as a real SharedPool and the rest
>> the shitty part (where all the system register things in this nice global variables (instead of using adequate class variables)) is now in
>> the classVariable TextSharedInformation of TextConstants
>>
>> Stef
>
>

--
Marcus Denker  -- http://www.marcusdenker.de
INRIA Lille -- Nord Europe. Team RMoD.


Reply | Threaded
Open this post in threaded view
|

Re: how to use dejavu bitmap fonts

Alain Plantec-3
In reply to this post by Benjamin Van Ryseghem (Pharo)
Le 01/02/2011 11:02, Benjamin a écrit :
> If it's still not working, I can have a look if you want :)
strange, it works here with 1.3 and DejaVuBitmapFonts-AlainPlantec.14.
Cheers
Alain

>
> Ben
>
> On Feb 1, 2011, at 7:07 AM, Stéphane Ducasse wrote:
>
>>> Hi Doru,
>>> I've take a look and I think I've fixed it.
>>> Unfortunately the network is much too slow here for this BIG package.
>>> You can simply fix it by yourself locally (before it is uploaded on squeaksource).
>>> Just edit DejaVuHolder class>>  #installSizes:
>>> and set it to:
>>>
>>> installSizes: aListOfInteger
>>>    "self installSizes: #(7 8 9 10 11 12 13 14 24)"
>>>    TextConstants TextSharedInformation
>>>        at: self fontName
>>>        put: (TextStyle fontArray: (self loadFromStructuresList:  (self fontStructureNamesForSizes: aListOfInteger))).
>>>    StrikeFont useUnderscoreIfOver1bpp.
>> Yes this should be it.
>>
>> Doru TextConstants was a dictionary containing poolVariables (old abstractions) AND values that people just added
>> as global dictionary. What we did was to define the fixed part of TextConstant = the poolVariables as a real SharedPool and the rest
>> the shitty part (where all the system register things in this nice global variables (instead of using adequate class variables)) is now in
>> the classVariable TextSharedInformation of TextConstants
>>
>> Stef
>
>


Reply | Threaded
Open this post in threaded view
|

Re: how to use dejavu bitmap fonts

Igor Stasenko
In reply to this post by Stéphane Ducasse
On 31 January 2011 22:00, Stéphane Ducasse <[hidden email]> wrote:
> The package should be updated to 1.2.
>
> It should declare fonts probably in one of the classVar of the TextConstant SharedPool.

Why fonts can't just use a classvar in AbstractFont class , why
depending on something outside of package?


> Probably
>        TextSharedInformation have a look.
>
> In 1.2 we cleaned the last global poolvar = textConstant which was used as a pool but also as a repository to plug anything inside
> instead of specific classVariable in adequate classes. It was a good plate of spaghettis code.
>
> I know that benjamin wants to take some times to do another pass and move the left over to the class they belongs to but it will
> take some time.
>
> Stef
>
> On Jan 31, 2011, at 9:52 PM, Tudor Girba wrote:
>
>> Hi,
>>
>> I am trying to use the DejaVuBitmapFonts, but I do not know how to install them. I tried the following:
>>
>> Gofer it
>>       squeaksource: 'DejaVu';
>>       package: 'DejaVuBitmapFonts';
>>       load.
>>
>> DejaVuHolder installFull.
>>
>> However, this creates a problem in using TextConstants. Can anyone help?
>>
>> Cheers,
>> Doru
>>
>>
>> --
>> www.tudorgirba.com
>>
>> "One cannot do more than one can do."
>>
>>
>>
>>
>
>
>



--
Best regards,
Igor Stasenko AKA sig.

Reply | Threaded
Open this post in threaded view
|

Re: how to use dejavu bitmap fonts

Stéphane Ducasse
Bingo!

> It should declare fonts probably in one of the classVar of the TextConstant SharedPool.
>
> Why fonts can't just use a classvar in AbstractFont class , why
> depending on something outside of package?

I like when quizzes are easy enough.. (ok the answer was already in previous mails)

I guess the answer is because people like to have a huge dictionary to put
stuff in there... so we will clean that again and move the dictionary extra stuff into adequate places.

Stef (aka random refactorer)
Reply | Threaded
Open this post in threaded view
|

Re: how to use dejavu bitmap fonts

Benjamin Van Ryseghem (Pharo)
In reply to this post by Igor Stasenko

On Feb 2, 2011, at 1:18 AM, Igor Stasenko wrote:

> On 31 January 2011 22:00, Stéphane Ducasse <[hidden email]> wrote:
>> The package should be updated to 1.2.
>>
>> It should declare fonts probably in one of the classVar of the TextConstant SharedPool.
>
> Why fonts can't just use a classvar in AbstractFont class , why
> depending on something outside of package?

Legacy and laziness I guess :)


Ben

>
>
>> Probably
>>        TextSharedInformation have a look.
>>
>> In 1.2 we cleaned the last global poolvar = textConstant which was used as a pool but also as a repository to plug anything inside
>> instead of specific classVariable in adequate classes. It was a good plate of spaghettis code.
>>
>> I know that benjamin wants to take some times to do another pass and move the left over to the class they belongs to but it will
>> take some time.
>>
>> Stef
>>
>> On Jan 31, 2011, at 9:52 PM, Tudor Girba wrote:
>>
>>> Hi,
>>>
>>> I am trying to use the DejaVuBitmapFonts, but I do not know how to install them. I tried the following:
>>>
>>> Gofer it
>>>       squeaksource: 'DejaVu';
>>>       package: 'DejaVuBitmapFonts';
>>>       load.
>>>
>>> DejaVuHolder installFull.
>>>
>>> However, this creates a problem in using TextConstants. Can anyone help?
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "One cannot do more than one can do."
>>>
>>>
>>>
>>>
>>
>>
>>
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>