Expert question: How to work with fonts and ComposedText?

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

Expert question: How to work with fonts and ComposedText?

Gruenewald, Tom

Hello forum.
I am looking for a detailed description, how to work with TextAttributes, TextStyle, FontPolicy, FontDescription and ComposedText. Especially in an international environment, e.g. using Kanji or Cyrillic.
The documentation about using ComposedText at this point is quite poor.

I should use one of the following fonts if available: Frutiger Next, Minion or Eurostile.
If none of them exists, I will probably use a more common font like Arial.

  1. How to check if a specified font is installed on the operating system?
  2. How to link an installed font in the VisualWorks environment?
  3. How to assign a defined font to a ComposedText?
  4. How to assign special properties (e.g. height, tracking, small caps, etc.) to a ComposedText?
  5. How to assign a sequence of alternative text styles to a ComposedText, if no desired font exist?
  6. How to avoid problems in an international environment? Imagine VisualWorks tries to display multiple byte characters by using a simple font (e.g. Kanji character displayed by using Arial)?

Thank you for your answers.

Best regards,
Tom Grünewald

________

Carl Zeiss Industrielle Messtechnik GmbH
Softwareentwicklung/Software Development

T o m G r ü n e w a l d

73446 Oberkochen, Germany
tel: +49.7364.20-8541
fax: +49.7364.20-4800
email: [hidden email]
http://www.zeiss.de/imt

Carl Zeiss Industrielle Messtechnik GmbH
Carl–Zeiss–Straße 22, 73447 Oberkochen
Aufsichtsratsvorsitzender: Dr. Dieter Kurz
Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Axel Jaeger
Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
Handelsregister: Amtsgericht Ulm, HRB 501561
USt–IdNr.: DE 811 515 346


----------------------------------------
This message is intended for a particular addressee only and may contain business or company secrets. If you have received this email in error, please contact the sender and delete the message immediately. Any use of this email, including saving, publishing, copying, replication or forwarding of the message or the contents is not permitted.


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Expert question: How to work with fonts and ComposedText?

Mark Pirogovsky-3
The first thing that comes to mind, is to install application specific
fonts at the same when you do install your application( like Eurostile),
so you know that it is there.
Then you can specify your font size reliably.

Hope that helps.

--Mark Pirogovsky

Gruenewald, Tom wrote:

>
> Hello forum.
> I am looking for a detailed description, how to work with
> TextAttributes, TextStyle, FontPolicy, FontDescription and
> ComposedText. Especially in an international environment, e.g. using
> Kanji or Cyrillic.
> The documentation about using ComposedText at this point is quite poor.
>
> I should use one of the following fonts if available: Frutiger Next,
> Minion or Eurostile.
> If none of them exists, I will probably use a more common font like Arial.
>
>    1. How to check if a specified font is installed on the operating
>       system?
>    2. How to link an installed font in the VisualWorks environment?
>    3. How to assign a defined font to a ComposedText?
>    4. How to assign special properties (e.g. height, tracking, small
>       caps, etc.) to a ComposedText?
>    5. How to assign a sequence of alternative text styles to a
>       ComposedText, if no desired font exist?
>    6. How to avoid problems in an international environment? Imagine
>       VisualWorks tries to display multiple byte characters by using a
>       simple font (e.g. Kanji character displayed by using Arial)?
>
>
> Thank you for your answers.
>
> Best regards,
> Tom Grünewald
>
> ________
>
> Carl Zeiss Industrielle Messtechnik GmbH
> Softwareentwicklung/Software Development
>
> T o m G r ü n e w a l d
>
> 73446 Oberkochen, Germany
> tel: +49.7364.20-8541
> fax: +49.7364.20-4800
> email: [hidden email]
> http://www.zeiss.de/imt
>
> Carl Zeiss Industrielle Messtechnik GmbH
> Carl–Zeiss–Straße 22, 73447 Oberkochen
> Aufsichtsratsvorsitzender: Dr. Dieter Kurz
> Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Axel Jaeger
> Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
> Handelsregister: Amtsgericht Ulm, HRB 501561
> USt–IdNr.: DE 811 515 346
>
> ----------------------------------------
> This message is intended for a particular addressee only and may
> contain business or company secrets. If you have received this email
> in error, please contact the sender and delete the message
> immediately. Any use of this email, including saving, publishing,
> copying, replication or forwarding of the message or the contents is
> not permitted.
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>    

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Expert question: How to work with fonts and ComposedText?

Steven Kelly
In reply to this post by Gruenewald, Tom
Another question is whether you need this to work on multiple platforms.
 
I suggest you try stepping through the display of a ComposedText onto a ScreenGraphicsContext. That will show you all the stages between your FontDescription and the screen. The list of OS fonts is read at startup, so that's also something to step through.
 
As you say, this is a) complicated and b) undocumented. Trying to do it across different encodings and different platforms is particularly challenging. I think you'll have to do the leg work at the start to build up your own understanding. There have been posts here or on c.l.s. before now, so you might find some help by searching the archives.
 
Good luck!
Steve


From: [hidden email] on behalf of Gruenewald, Tom
Sent: Fri 05/11/2010 18:09
To: [hidden email]
Subject: [vwnc] Expert question: How to work with fonts and ComposedText?

Hello forum.
I am looking for a detailed description, how to work with TextAttributes, TextStyle, FontPolicy, FontDescription and ComposedText. Especially in an international environment, e.g. using Kanji or Cyrillic.
The documentation about using ComposedText at this point is quite poor.

I should use one of the following fonts if available: Frutiger Next, Minion or Eurostile.
If none of them exists, I will probably use a more common font like Arial.

  1. How to check if a specified font is installed on the operating system?
  2. How to link an installed font in the VisualWorks environment?
  3. How to assign a defined font to a ComposedText?
  4. How to assign special properties (e.g. height, tracking, small caps, etc.) to a ComposedText?
  5. How to assign a sequence of alternative text styles to a ComposedText, if no desired font exist?
  6. How to avoid problems in an international environment? Imagine VisualWorks tries to display multiple byte characters by using a simple font (e.g. Kanji character displayed by using Arial)?

Thank you for your answers.

Best regards,
Tom Grünewald

________

Carl Zeiss Industrielle Messtechnik GmbH
Softwareentwicklung/Software Development

T o m G r ü n e w a l d

73446 Oberkochen, Germany
tel: +49.7364.20-8541
fax: +49.7364.20-4800
email: [hidden email]
http://www.zeiss.de/imt

Carl Zeiss Industrielle Messtechnik GmbH
Carl–Zeiss–Straße 22, 73447 Oberkochen
Aufsichtsratsvorsitzender: Dr. Dieter Kurz
Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Axel Jaeger
Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
Handelsregister: Amtsgericht Ulm, HRB 501561
USt–IdNr.: DE 811 515 346


----------------------------------------
This message is intended for a particular addressee only and may contain business or company secrets. If you have received this email in error, please contact the sender and delete the message immediately. Any use of this email, including saving, publishing, copying, replication or forwarding of the message or the contents is not permitted.


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Expert question: How to work with fonts and ComposedText?

Mark Pirogovsky-3
To look up all the fonts available on your environment you can use the
following:

Screen default defaultFontPolicy availableFonts
and
Screen default defaultFontPolicy usablePlatformFonts.

There is an example how to force your application to use the named font,
I'll post it as soon as I find it.



Steven Kelly wrote:

> Another question is whether you need this to work on multiple platforms.
> I suggest you try stepping through the display of a ComposedText onto
> a ScreenGraphicsContext. That will show you all the stages between
> your FontDescription and the screen. The list of OS fonts is read at
> startup, so that's also something to step through.
> As you say, this is a) complicated and b) undocumented. Trying to do
> it across different encodings and different platforms is particularly
> challenging. I think you'll have to do the leg work at the start to
> build up your own understanding. There have been posts here or on
> c.l.s. before now, so you might find some help by searching the archives.
> Good luck!
> Steve
>
> ------------------------------------------------------------------------
> *From:* [hidden email] on behalf of Gruenewald, Tom
> *Sent:* Fri 05/11/2010 18:09
> *To:* [hidden email]
> *Subject:* [vwnc] Expert question: How to work with fonts and
> ComposedText?
>
> Hello forum.
> I am looking for a detailed description, how to work with
> TextAttributes, TextStyle, FontPolicy, FontDescription and
> ComposedText. Especially in an international environment, e.g. using
> Kanji or Cyrillic.
> The documentation about using ComposedText at this point is quite poor.
>
> I should use one of the following fonts if available: Frutiger Next,
> Minion or Eurostile.
> If none of them exists, I will probably use a more common font like Arial.
>
>    1. How to check if a specified font is installed on the operating
>       system?
>    2. How to link an installed font in the VisualWorks environment?
>    3. How to assign a defined font to a ComposedText?
>    4. How to assign special properties (e.g. height, tracking, small
>       caps, etc.) to a ComposedText?
>    5. How to assign a sequence of alternative text styles to a
>       ComposedText, if no desired font exist?
>    6. How to avoid problems in an international environment? Imagine
>       VisualWorks tries to display multiple byte characters by using a
>       simple font (e.g. Kanji character displayed by using Arial)?
>
>
> Thank you for your answers.
>
> Best regards,
> Tom Grünewald
>
> ________
>
> Carl Zeiss Industrielle Messtechnik GmbH
> Softwareentwicklung/Software Development
>
> T o m G r ü n e w a l d
>
> 73446 Oberkochen, Germany
> tel: +49.7364.20-8541
> fax: +49.7364.20-4800
> email: [hidden email]
> http://www.zeiss.de/imt
>
> Carl Zeiss Industrielle Messtechnik GmbH
> Carl–Zeiss–Straße 22, 73447 Oberkochen
> Aufsichtsratsvorsitzender: Dr. Dieter Kurz
> Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Axel Jaeger
> Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
> Handelsregister: Amtsgericht Ulm, HRB 501561
> USt–IdNr.: DE 811 515 346
>
> ----------------------------------------
> This message is intended for a particular addressee only and may
> contain business or company secrets. If you have received this email
> in error, please contact the sender and delete the message
> immediately. Any use of this email, including saving, publishing,
> copying, replication or forwarding of the message or the contents is
> not permitted.
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>    

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Expert question: How to work with fonts and ComposedText?

Bruce Boyer
In reply to this post by Steven Kelly
"Quite poor" comments seldom surprise me, but send me looking.  But the "undocumented" comment really left me scratching my head, since I knew there had been some.  It turns out that a couple sections were inadvertently left out of the BasicLibs doc while being restructured.  Attached are the sections, and they will be in the doc for 7.8.
 
Sorry for the oversight.  Please, comment on these sections and I can try to remedy the "quite poor" parts, too.
 
Bruce
----- Original Message -----
Sent: Saturday, November 06, 2010 5:58 AM
Subject: Re: [vwnc] Expert question: How to work with fonts and ComposedText?

Another question is whether you need this to work on multiple platforms.
 
I suggest you try stepping through the display of a ComposedText onto a ScreenGraphicsContext. That will show you all the stages between your FontDescription and the screen. The list of OS fonts is read at startup, so that's also something to step through.
 
As you say, this is a) complicated and b) undocumented. Trying to do it across different encodings and different platforms is particularly challenging. I think you'll have to do the leg work at the start to build up your own understanding. There have been posts here or on c.l.s. before now, so you might find some help by searching the archives.
 
Good luck!
Steve


From: [hidden email] on behalf of Gruenewald, Tom
Sent: Fri 05/11/2010 18:09
To: [hidden email]
Subject: [vwnc] Expert question: How to work with fonts and ComposedText?

Hello forum.
I am looking for a detailed description, how to work with TextAttributes, TextStyle, FontPolicy, FontDescription and ComposedText. Especially in an international environment, e.g. using Kanji or Cyrillic.
The documentation about using ComposedText at this point is quite poor.

I should use one of the following fonts if available: Frutiger Next, Minion or Eurostile.
If none of them exists, I will probably use a more common font like Arial.

  1. How to check if a specified font is installed on the operating system?
  2. How to link an installed font in the VisualWorks environment?
  3. How to assign a defined font to a ComposedText?
  4. How to assign special properties (e.g. height, tracking, small caps, etc.) to a ComposedText?
  5. How to assign a sequence of alternative text styles to a ComposedText, if no desired font exist?
  6. How to avoid problems in an international environment? Imagine VisualWorks tries to display multiple byte characters by using a simple font (e.g. Kanji character displayed by using Arial)?

Thank you for your answers.

Best regards,
Tom Grünewald

________

Carl Zeiss Industrielle Messtechnik GmbH
Softwareentwicklung/Software Development

T o m G r ü n e w a l d

73446 Oberkochen, Germany
tel: +49.7364.20-8541
fax: +49.7364.20-4800
email: [hidden email]
http://www.zeiss.de/imt

Carl Zeiss Industrielle Messtechnik GmbH
Carl–Zeiss–Straße 22, 73447 Oberkochen
Aufsichtsratsvorsitzender: Dr. Dieter Kurz
Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Axel Jaeger
Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
Handelsregister: Amtsgericht Ulm, HRB 501561
USt–IdNr.: DE 811 515 346


----------------------------------------
This message is intended for a particular addressee only and may contain business or company secrets. If you have received this email in error, please contact the sender and delete the message immediately. Any use of this email, including saving, publishing, copying, replication or forwarding of the message or the contents is not permitted.


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

formattedText.pdf (85K) Download Attachment
charcterFormat.pdf (133K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Expert question: How to work with fonts and ComposedText?

Steven Kelly
In reply to this post by Gruenewald, Tom

Thanks Bruce, I’m sure those docs will save Tom a lot of time. My comments about “undocumented” were actually about the cross-platform, cross-locale issues that we (and I guess Tom) face when trying to get VW fonts to work seamlessly for Kanji etc. Sorry if I appeared to be tarring the whole font documentation with the same brush.

 

The 7.7.1 InternationalGuide.pdf seems to have nothing on fonts beyond “make sure you install the right fonts on your OS”. Maybe it really is that easy now, but at least before there was a fair amount of work within VW too. The PDF also has a section called “Old Stuff” that you may want to review :).

 

The actual mechanism by which VW chooses a concrete font is something that could be documented better (IIRC – I’ll admit I haven’t searched the 771 docs yet). Then again, maybe I really want it to be designed/implemented better: I know that’s been on the roadmap at some point. At least the easy stuff could be made easier, even if things like Kanji and exciting encodings will always be tricky.

 

Steve

 

From: Bruce Boyer [mailto:[hidden email]]
Sent: 8. marraskuuta 2010 18:29
To: Steven Kelly; Gruenewald, Tom; [hidden email]
Subject: Re: [vwnc] Expert question: How to work with fonts and ComposedText?

 

"Quite poor" comments seldom surprise me, but send me looking.  But the "undocumented" comment really left me scratching my head, since I knew there had been some.  It turns out that a couple sections were inadvertently left out of the BasicLibs doc while being restructured.  Attached are the sections, and they will be in the doc for 7.8.

 

Sorry for the oversight.  Please, comment on these sections and I can try to remedy the "quite poor" parts, too.

 

Bruce

----- Original Message -----

Sent: Saturday, November 06, 2010 5:58 AM

Subject: Re: [vwnc] Expert question: How to work with fonts and ComposedText?

 

Another question is whether you need this to work on multiple platforms.

 

I suggest you try stepping through the display of a ComposedText onto a ScreenGraphicsContext. That will show you all the stages between your FontDescription and the screen. The list of OS fonts is read at startup, so that's also something to step through.

 

As you say, this is a) complicated and b) undocumented. Trying to do it across different encodings and different platforms is particularly challenging. I think you'll have to do the leg work at the start to build up your own understanding. There have been posts here or on c.l.s. before now, so you might find some help by searching the archives.

 

Good luck!

Steve

 


From: [hidden email] on behalf of Gruenewald, Tom
Sent: Fri 05/11/2010 18:09
To: [hidden email]
Subject: [vwnc] Expert question: How to work with fonts and ComposedText?

Hello forum.
I am looking for a detailed description, how to work with TextAttributes, TextStyle, FontPolicy, FontDescription and ComposedText. Especially in an international environment, e.g. using Kanji or Cyrillic.
The documentation about using ComposedText at this point is quite poor.

I should use one of the following fonts if available: Frutiger Next, Minion or Eurostile.
If none of them exists, I will probably use a more common font like Arial.

  1. How to check if a specified font is installed on the operating system?
  2. How to link an installed font in the VisualWorks environment?
  3. How to assign a defined font to a ComposedText?
  4. How to assign special properties (e.g. height, tracking, small caps, etc.) to a ComposedText?
  5. How to assign a sequence of alternative text styles to a ComposedText, if no desired font exist?
  6. How to avoid problems in an international environment? Imagine VisualWorks tries to display multiple byte characters by using a simple font (e.g. Kanji character displayed by using Arial)?


Thank you for your answers.

Best regards,
Tom Grünewald

________

Carl Zeiss Industrielle Messtechnik GmbH
Softwareentwicklung/Software Development

T o m G r ü n e w a l d

73446 Oberkochen, Germany
tel: +49.7364.20-8541
fax: +49.7364.20-4800
email: [hidden email]
http://www.zeiss.de/imt

Carl Zeiss Industrielle Messtechnik GmbH
Carl–Zeiss–Straße 22, 73447 Oberkochen
Aufsichtsratsvorsitzender: Dr. Dieter Kurz
Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Axel Jaeger
Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
Handelsregister: Amtsgericht Ulm, HRB 501561
USt–IdNr.: DE 811 515 346


----------------------------------------
This message is intended for a particular addressee only and may contain business or company secrets. If you have received this email in error, please contact the sender and delete the message immediately. Any use of this email, including saving, publishing, copying, replication or forwarding of the message or the contents is not permitted.


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Expert question: How to work with fonts and ComposedText?

Gruenewald, Tom
In reply to this post by Mark Pirogovsky-3

Thank you for your answers. Indeed you helped me a lot.

By the way: I've got all your notes directly, even if they were addressed to the newsgroup. Does the VWNC newsgroup server filter the posted emails by addressee?

Best regards,
Tom Grünewald


________

Carl Zeiss Industrielle Messtechnik GmbH
Softwareentwicklung/Software Development

T o m G r ü n e w a l d

73446 Oberkochen, Germany
tel: +49.7364.20-8541
fax: +49.7364.20-4800
email: [hidden email]
http://www.zeiss.de/imt

Carl Zeiss Industrielle Messtechnik GmbH
Carl–Zeiss–Straße 22, 73447 Oberkochen
Aufsichtsratsvorsitzender: Dr. Dieter Kurz
Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Axel Jaeger
Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
Handelsregister: Amtsgericht Ulm, HRB 501561
USt–IdNr.: DE 811 515 346


----------------------------------------
This message is intended for a particular addressee only and may contain business or company secrets. If you have received this email in error, please contact the sender and delete the message immediately. Any use of this email, including saving, publishing, copying, replication or forwarding of the message or the contents is not permitted.


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

Reply | Threaded
Open this post in threaded view
|

Re: Expert question: How to work with fonts and ComposedText?

Steven Kelly
In reply to this post by Gruenewald, Tom
No, the list doesn't filter the emails; Bruce and I just did "reply to all", so our reply went both to the list and to you personally. The mail servers generally sort things out so you don't get two copies of the same message. There's no hard rule about whether to reply to all, or just to the list.
 
All the best,
Steve


From: [hidden email] on behalf of Gruenewald, Tom
Sent: Tue 09/11/2010 17:41
To: [hidden email]
Subject: Re: [vwnc] Expert question: How to work with fonts and ComposedText?

Thank you for your answers. Indeed you helped me a lot.

By the way: I've got all your notes directly, even if they were addressed to the newsgroup. Does the VWNC newsgroup server filter the posted emails by addressee?

Best regards,
Tom Grünewald


________

Carl Zeiss Industrielle Messtechnik GmbH
Softwareentwicklung/Software Development

T o m G r ü n e w a l d

73446 Oberkochen, Germany
tel: +49.7364.20-8541
fax: +49.7364.20-4800
email: [hidden email]
http://www.zeiss.de/imt

Carl Zeiss Industrielle Messtechnik GmbH
Carl–Zeiss–Straße 22, 73447 Oberkochen
Aufsichtsratsvorsitzender: Dr. Dieter Kurz
Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Axel Jaeger
Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
Handelsregister: Amtsgericht Ulm, HRB 501561
USt–IdNr.: DE 811 515 346


----------------------------------------
This message is intended for a particular addressee only and may contain business or company secrets. If you have received this email in error, please contact the sender and delete the message immediately. Any use of this email, including saving, publishing, copying, replication or forwarding of the message or the contents is not permitted.


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc