[comp.sys.amiga.programmer] Bitmapped font scaling? AmigaMail!

manes@vger.nsu.edu ((Mark D. Manes), Norfolk State University) (06/26/91)

'ello!

Question:  In 2.0 why doesn't the information window (from the drop-down
menu under Icon on the Workbench) multitask?  It seems to me that this
would be quite natural.  I thought one of the main features of the 
revised Workbench under AmigaDOS 2.0 was to add more multitasking.  

On another note.  I was reading the article in AmigaMail about the
asl.library.  Did anyone notice besides myself that, according to the
article, if a font requestor is created the user can enter the point
size regardless of whether that font point size existed.  The implication 
was that the font would be scaled...and this was the bitmapped fonts!  
Is this true, or did I misinterpet the article?  If it is true, is it
'correct' for a requestor to do any processing?  It seems to me that
while on the surface this may seem to be great, it may be less than
wonderful if the scaling can't be aborted in the case of a bad entry.

If it is true...why is this not implemented in the font preferences
program?

I guess before debating the wonders of this, I ought to see if I 
understood what I read. ;-)

Enough questions for now... I await your answers.

Thanks in advance.

-mark=
manes@vger.nsu.edu

navas@cory.Berkeley.EDU (David C. Navas) (06/26/91)

In article <1124.2867637f@vger.nsu.edu> manes@vger.nsu.edu ((Mark D. Manes), Norfolk State University) writes:
>...revised Workbench under AmigaDOS 2.0 was to add more multitasking.  

Snort.

>On another note.  I was reading the article in AmigaMail about the
>...
>size regardless of whether that font point size existed.  The implication 

Umm, well TurboText does do that.  The results aren't really pleasant
(especially when fonts are downscaled), but as the fonts have no hinting,
that's not surprising.

>while on the surface this may seem to be great, it may be less than
>wonderful if the scaling can't be aborted in the case of a bad entry.

Well, good user-interface design dictates that the User sees the scaled
font *before* the requester is exited.  Again, TurboText has that.
[Gee what editor does he use, I wonder ;)]

>If it is true...why is this not implemented in the font preferences
>program?

I've been wondering that myself.  Probably had to do with having the
font scaling done after the font selection program.  Of course, they should
have updated the preferences program....

David Navas                                   navas@cory.berkeley.edu
	2.0 :: "You can't have your cake and eat it too."
Also try c186br@holden, c260-ay@ara and c184-ap@torus

johno@cbmvax.commodore.com (John Orr - CATS) (06/26/91)

In article <1124.2867637f@vger.nsu.edu> manes@vger.nsu.edu ((Mark D. Manes), Norfolk State University) writes:
>
>[...]
>
>
>On another note.  I was reading the article in AmigaMail about the
>asl.library.  Did anyone notice besides myself that, according to the
>article, if a font requestor is created the user can enter the point
>size regardless of whether that font point size existed.  The implication 
>was that the font would be scaled...and this was the bitmapped fonts!  
>Is this true, or did I misinterpet the article?  

This is true.


> If it is true, is it 'correct' for a requestor to do any processing?

I'm not sure exactly what you mean by "processing".  The requester can
screen out certain entries from appearing in the requester but it
can't prevent the user from typing in whatever font or point size they
wish.  As long as the font requester can open the font, it will return
a corresponding TextAttr when the user clicks "OK".

>It seems to me that
>while on the surface this may seem to be great, it may be less than
>wonderful if the scaling can't be aborted in the case of a bad entry.
>

Why do you need to abort the scaling?  If the font is too big to fit
in memory, the system won't scale it.  If the font is too grotesque
after scaling, it's the user's choice to use that font or not.

>If it is true...why is this not implemented in the font preferences
>program?
>

I do not know.


--John

manes@vger.nsu.edu ((Mark D. Manes), Norfolk State University) (06/27/91)

In article <14290@pasteur.Berkeley.EDU>, navas@cory.Berkeley.EDU (David C. Navas) writes:
> In article <1124.2867637f@vger.nsu.edu> manes@vger.nsu.edu ((Mark D. Manes), Norfolk State University) writes:
>>...revised Workbench under AmigaDOS 2.0 was to add more multitasking.  
> 
> Snort.

Snort?  What kind of response is 'snort'?   It is rude to snort
in public...so here is a hanky to do it in.  :-)

> 
>>On another note.  I was reading the article in AmigaMail about the
>>...
>>size regardless of whether that font point size existed.  The implication 
> 
> Umm, well TurboText does do that.  The results aren't really pleasant
> (especially when fonts are downscaled), but as the fonts have no hinting,
> that's not surprising.
> 
>>while on the surface this may seem to be great, it may be less than
>>wonderful if the scaling can't be aborted in the case of a bad entry.
> 
> Well, good user-interface design dictates that the User sees the scaled
> font *before* the requester is exited.  Again, TurboText has that.
> [Gee what editor does he use, I wonder ;)]

I use CEDPro and I don't regularly change fonts.  TurboText is new so
it should not be a surprise that everyone is not informed as to what
it has for features.

I can see the point of seeing the generated font prior to selecting it,
but I wonder what happens and how long it takes on a non-accellerated
machine to generate a 99 point font?  What happens when the font is
generated... is this font saved to disk?  If so, what happens if the
disk is full?  What is the result code from the requestor?   How does
the user abort the generation if it is not what he wants?

I am not flaming, but I feel the AmigaMail article left out some
interesting details.

> 
> David Navas                                   navas@cory.berkeley.edu
> 	2.0 :: "You can't have your cake and eat it too."
> Also try c186br@holden, c260-ay@ara and c184-ap@torus

-mark=
manes@vger.nsu.edu

navas@cory.Berkeley.EDU (David C. Navas) (06/27/91)

In article <1129.286894b2@vger.nsu.edu> manes@vger.nsu.edu ((Mark D. Manes), Norfolk State University) writes:
>In article <14290@pasteur.Berkeley.EDU>, navas@cory.Berkeley.EDU (David C. Navas) writes:
>> Snort.
>
>Snort?  What kind of response is 'snort'?   It is rude to snort
>in public...so here is a hanky to do it in.  :-)

Ah, thank ye.  Must be allergies, surely couldn't have been commenting on
our wonderful new Workbench.  ;}

>> Well, good user-interface design dictates that the User sees the scaled
>> font *before* the requester is exited.  Again, TurboText has that.
>> [Gee what editor does he use, I wonder ;)]
>
>I use CEDPro and I don't regularly change fonts.  TurboText is new so
>it should not be a surprise that everyone is not informed as to what
>it has for features.

Err, yeah, I was talking about myself in a different "person" or whatever
the technical term is.  I wasn't referring to you or anyone else.  Nor
indeed trying to start an editor war.  Goodness, I try to restrict myself
to .advocacy for that. :)

>I can see the point of seeing the generated font prior to selecting it,
>but I wonder what happens and how long it takes on a non-accellerated
>machine to generate a 99 point font?  What happens when the font is

Well, I'd be surprised if it took longer than 2 seconds or so.  
On my A3000 iit was instantaneous.  But then, that's not surprising,
so is everything else....  Unfortunately, my A500 is at my girlfriends.

>generated... is this font saved to disk?  If so, what happens if the

Not that I know of.

>disk is full?  What is the result code from the requestor?   How does

Good question.  Lesse, my asl.doc says that AllocAslRequest() will
allocate a "struct FontRequester *" which it returns...  [My include
headers says that you must call AllocFontRequest, which my AutoDocs
don't mention]  Apparently calling AslRequest() gets input for the
requester from the user, there are callback functions to allow you
to accept or reject certain font sizes, etc.  And when AslRequest()
comes back non-NULL, well then we get foggier.  The Docs say to refer to
the includes.  The includes say nothing.  My guess would be that
the "READ ONLY!!!" part of the FontRequester structure is filled in
with the fontname and size (they are there...), so you could open the
font.  Good question as to whether the requester has already openned
the font, though...

>the user abort the generation if it is not what he wants?

Abort the generation?  If it only takes a couple of seconds?  There
is a Cancel button....

>I am not flaming, but I feel the AmigaMail article left out some
>interesting details.

They usually do.  Too short, not frequent enough either.  Oh well.

>-mark=
>manes@vger.nsu.edu

I hope this helped, instead of further confusing.  I'd read the asl.doc
if you have it -- very interesting.  If only the rest of the system
were so configurable :)

David Navas                                   navas@cory.berkeley.edu
	2.0 :: "You can't have your cake and eat it too."
Also try c186br@holden, c260-ay@ara and c184-ap@torus

mykes@amiga0.SF-Bay.ORG (Mike Schwartz) (06/27/91)

In article <1124.2867637f@vger.nsu.edu> manes@vger.nsu.edu ((Mark D. Manes), Norfolk State University) writes:
>'ello!
>
>Question:  In 2.0 why doesn't the information window (from the drop-down
>menu under Icon on the Workbench) multitask?  It seems to me that this
>would be quite natural.  I thought one of the main features of the 
>revised Workbench under AmigaDOS 2.0 was to add more multitasking.  
>

There's a lot more than INFO that doesn't multitask under 2.0.  When you
open a drawer with a bunch of files in it, the workbench goes away for
as long as it takes to put up all the icons.  On my A3000, if I have the
HDInstall program low-level formatting a hard drive (or doing any "long"
disk operation), I can stick a floppy in the drive and the workbench
doesn't even recognize it until the hard disk operation is complete.
In fact, HDToolBox is a GIANT step down from FAAASTPREP from GVP, which
is excellent.  HDToolBox has one of the most "graceful" exits I have ever
seen: "Click here to Reboot your machine" :)

>On another note.  I was reading the article in AmigaMail about the
>asl.library.  Did anyone notice besides myself that, according to the
>article, if a font requestor is created the user can enter the point
>size regardless of whether that font point size existed.  The implication 
>was that the font would be scaled...and this was the bitmapped fonts!  
>Is this true, or did I misinterpet the article?  If it is true, is it
>'correct' for a requestor to do any processing?  It seems to me that
>while on the surface this may seem to be great, it may be less than
>wonderful if the scaling can't be aborted in the case of a bad entry.
>
>If it is true...why is this not implemented in the font preferences
>program?
>
>I guess before debating the wonders of this, I ought to see if I 
>understood what I read. ;-)
>

You do indeed get a font of the size you request, but it looks pretty
ugly.


--
****************************************************
* I want games that look like Shadow of the Beast  *
* but play like Leisure Suit Larry.                *
****************************************************

baxter_a@wehi.dn.mu.oz (06/27/91)

In article <22695@cbmvax.commodore.com>, johno@cbmvax.commodore.com (John Orr - CATS) writes:
> In article <1124.2867637f@vger.nsu.edu> manes@vger.nsu.edu ((Mark D. Manes), Norfolk State University) writes:
>>
>>[...]
>>
>>
>>On another note.  I was reading the article in AmigaMail about the
>>asl.library.  Did anyone notice besides myself that, according to the
>>article, if a font requestor is created the user can enter the point
>>size regardless of whether that font point size existed.  The implication 
>>was that the font would be scaled...and this was the bitmapped fonts!  
>>Is this true, or did I misinterpet the article?  
> 
> This is true.

Great! So do we also have font rotation? (Even just 90 deg would be nice)

Regards Alan

msiskin@css.itd.umich.edu (Marc Siskin) (06/27/91)

>> In article <1124.2867637f@vger.nsu.edu> manes@vger.nsu.edu ((Mark D. Manes), Norfolk State University) writes:
>>>On another note.  I was reading the article in AmigaMail about the
>>>asl.library.  Did anyone notice besides myself that, according to the
>>>article, if a font requestor is created the user can enter the point
>>>size regardless of whether that font point size existed.  The implication 
>>>was that the font would be scaled...and this was the bitmapped fonts!  
>>>Is this true, or did I misinterpet the article?  
>> 

And if you read the description of the command SETFONT in the 2.0 Manual you
will see the keyword SCALE.  SO, it seems that you don't have to use the
asl.library requestor in order to scale a font.  You don't even have to write
a program.  CBM provided us with one.  

Now the font scaling that setfont does can be buttugly at times but, it is 
there.  Now all we have to do is wait (im)patiently for 2.0x (>3) and the
promised outline fonts and then we will be all set!

Marc Siskin
Senior Media Designer
Language Resource Center
University of Michigan, Ann Arbor

My opinions are my own.
Msiskin@shogun.css.itd.umich.edu

johno@cbmvax.commodore.com (John Orr - CATS) (06/27/91)

In article <1129.286894b2@vger.nsu.edu> manes@vger.nsu.edu ((Mark D. Manes), Norfolk State University) writes:
>In article <14290@pasteur.Berkeley.EDU>, navas@cory.Berkeley.EDU (David C. Navas) writes:
>> In article <1124.2867637f@vger.nsu.edu> manes@vger.nsu.edu ((Mark D. Manes), Norfolk State University) writes:

>> 
>> [Snort removed]
>
>
>What happens when the font is
>generated... is this font saved to disk?  

No, but it still should be in memory as long as you don't do anything
to flush it out.


> What is the result code from the requestor?   

The AslRequest() functions return a zero if the user clicked "Cancel"
or if the function failed for some reason.

>How does the user abort the generation if it is not what he wants?

The user can't abort the *generation* of a font because asl.library is
not scaling the font.  Asl.library doesn't know anything about where
fonts come from, it just blindly asks diskfont.library (or
graphics.library) for whatever font the user clicked on.  If the user
asks for a 999 point font called aintgotno.font, asl will ask
diskfont.library for that font.  Asl has no control over what
diskfont.library or graphics.library does.  If diskfont.library finds
that font but not that size, it'll try to scale it.

>
>I am not flaming, but I feel the AmigaMail article left out some
>interesting details.
>

Most of the details you are asking about have to do with the
diskfont.library and graphics.library.  


--John

johno@cbmvax.commodore.com (John Orr - CATS) (06/27/91)

In article <14303@pasteur.Berkeley.EDU> navas@cory.Berkeley.EDU writes:
>In article <1129.286894b2@vger.nsu.edu> manes@vger.nsu.edu ((Mark D. Manes), Norfolk State University) writes:
>>In article <14290@pasteur.Berkeley.EDU>, navas@cory.Berkeley.EDU (David C. Navas) writes:
>
>Good question.  Lesse, my asl.doc says that AllocAslRequest() will
>allocate a "struct FontRequester *" which it returns...  [My include
>headers says that you must call AllocFontRequest, which my AutoDocs
>don't mention]  

What version of the include files do you have?  I don't think it says
that anymore.  

>
>>I am not flaming, but I feel the AmigaMail article left out some
>>interesting details.
>
>They usually do.  

If you have any comments, bugs, or suggestions for improvement (or
articles) for Amiga Mail please e-mail them to me:

johno@cbmvax.commodore.com   ..or..   [uunet|rutgers]!cbmvax!johno



--John
The Amiga Mail Editor

johno@cbmvax.commodore.com (John Orr - CATS) (06/27/91)

In article <1991Jun27.104700.24636@wehi.dn.mu.oz> baxter_a@wehi.dn.mu.oz writes:
>In article <22695@cbmvax.commodore.com>, johno@cbmvax.commodore.com (John Orr - CATS) writes:
>> In article <1124.2867637f@vger.nsu.edu> manes@vger.nsu.edu ((Mark D. Manes), Norfolk State University) writes:
>>>
>>>[...]
>>>
>>>
>> 
>> This is true.
>
>Great! So do we also have font rotation? (Even just 90 deg would be nice)
>

Not yet.

--John

darren@cbmvax.commodore.com (Darren Greenwald) (06/27/91)

In article <1129.286894b2@vger.nsu.edu> manes@vger.nsu.edu ((Mark D. Manes), Norfolk State University) writes:
>In article <14290@pasteur.Berkeley.EDU>, navas@cory.Berkeley.EDU (David C. Navas) writes:
>> In article <1124.2867637f@vger.nsu.edu> manes@vger.nsu.edu ((Mark D. Manes), Norfolk State University) writes:
>>>...revised Workbench under AmigaDOS 2.0 was to add more multitasking.  
>
>I can see the point of seeing the generated font prior to selecting it,
>but I wonder what happens and how long it takes on a non-accellerated
>machine to generate a 99 point font?  What happens when the font is
>generated... is this font saved to disk?  If so, what happens if the
>disk is full?  What is the result code from the requestor?   How does
>the user abort the generation if it is not what he wants?

Takes possibly a few seconds on a slow machine to scale a font this
large.  The font is in memory only, and will be flushed if the
viewer closes the font (and the memory is needed).  I don't see
that its a big problem to show another size - in most cases the
user would click on an existing size, and would manually enter
another - in the later case the user would soon learn scaled fonts
(bitmapped scaled) take a few moments to generate.

>
>I am not flaming, but I feel the AmigaMail article left out some
>interesting details.
>

--------------------------------------------------------------
Darren M. Greenwald | Commodore-Amiga Software Engineering   
                    | USENET: uunet!cbmvax!darren                       
--------------------------------------------------------------
Quote: "It would be impossible to discuss the subject without
        a common frame of reference." - Spock

darren@cbmvax.commodore.com (Darren Greenwald) (06/27/91)

In article <1991Jun27.104700.24636@wehi.dn.mu.oz> baxter_a@wehi.dn.mu.oz writes:
>In article <22695@cbmvax.commodore.com>, johno@cbmvax.commodore.com (John Orr - CATS) writes:
>> In article <1124.2867637f@vger.nsu.edu> manes@vger.nsu.edu ((Mark D. Manes), Norfolk State University) writes:
>>>
>>>asl.library.  Did anyone notice besides myself that, according to the
>> 
>> This is true.
>
>Great! So do we also have font rotation? (Even just 90 deg would be nice)
>

What do you want to rotate?  The font data, or the output from Text()?

I suspect what you want is to have a line of text rotated before
its drawn in the layer - actually you can do that now if your
willing to do the rotation (e.g., draw in an off-screen map,
rotate, and BltTemplate() rotated image into visible layer).
You could use DPAINT's rotation feature to get a feel for how fast, 
or slow it might be done.

The bitmap scale routines actually create a new font with scaled data.
There is therefore no performance penality for using a scaled font
(other than the initial scaling).

Rotation of a line on the other hand has to be done on the fly.


--------------------------------------------------------------
Darren M. Greenwald | Commodore-Amiga Software Engineering   
                    | USENET: uunet!cbmvax!darren                       
--------------------------------------------------------------
Quote: "It would be impossible to discuss the subject without
        a common frame of reference." - Spock

carolyn@cbmvax.commodore.com (Carolyn Scheppner - CATS) (06/28/91)

In article <1124.2867637f@vger.nsu.edu> manes@vger.nsu.edu ((Mark D. Manes), Norfolk State University) writes:
>...
>On another note.  I was reading the article in AmigaMail about the
>asl.library.  Did anyone notice besides myself that, according to the
>article, if a font requestor is created the user can enter the point
>size regardless of whether that font point size existed.  The implication 
>was that the font would be scaled...and this was the bitmapped fonts!  
>Is this true, or did I misinterpet the article?  If it is true, is it
>'correct' for a requestor to do any processing?  It seems to me that
>while on the surface this may seem to be great, it may be less than
>wonderful if the scaling can't be aborted in the case of a bad entry.

As long as the caller doesn't set the FPF_DESIGNED flag in
TextAttr.Flags when calling OpenDiskFont(), 2.0 will scale the
font to the size requested if the size is not available as
a designed size.

This will be bitmap scaling for non-outline fonts, and these can
look pretty weird.  However, for upcoming outline fonts, it will
look great.

As far as processing/filtering goes, I felt it was better to let
people scale fonts by default - after all, the user has to explicitly
do extra work to enter a size that is not presented in the list.
I felt that the scrolling list implied "Here are the fonts I want you
to chose from", and that a user who goes out of their way to enter
something other than what is presented in the list 1. knows what
they want and 2. can live with the consequences.

The application is always free to reject the font selected and
force the user to choose again.

-- 
==========================================================================
 Carolyn Scheppner -- Tech. Mgr. CATS - Commodore Amiga Technical Support
 PHONE 215-431-9180 {uunet,rutgers}!cbmvax!carolyn  carolyn@commodore.com

 Signed characters are xenophobic.  
==========================================================================

es1@cunixb.cc.columbia.edu (Ethan Solomita) (06/28/91)

In article <22732@cbmvax.commodore.com> johno@cbmvax.commodore.com (John Orr - CATS) writes:
>In article <1991Jun27.104700.24636@wehi.dn.mu.oz> baxter_a@wehi.dn.mu.oz writes:
>>In article <22695@cbmvax.commodore.com>, johno@cbmvax.commodore.com (John Orr - CATS) writes:
>>> In article <1124.2867637f@vger.nsu.edu> manes@vger.nsu.edu ((Mark D. Manes), Norfolk State University) writes:
>>>>
>>>>[...]
>>>>
>>>>
>>> 
>>> This is true.
>>
>>Great! So do we also have font rotation? (Even just 90 deg would be nice)
>>
>
>Not yet.
>
>--John


	Font Tease! 8-)
	-- Ethan

FF buckets of bits on the bus,	FF buckets of bits.
Take one down,			Short it to ground,
FE buckets of bits on the bus.

navas@cory.Berkeley.EDU (David C. Navas) (06/28/91)

In article <22729@cbmvax.commodore.com> johno@cbmvax.commodore.com (John Orr - CATS) writes:
>The AslRequest() functions return a zero if the user clicked "Cancel"
>or if the function failed for some reason.

Okay, I got that.  Unfortunately, I seem to have old includes, so... What
does AslRequest() return when successful (for a Font requester, that is)?

>The user can't abort the *generation* of a font because asl.library is

True, but the application has the ability to add callbacks so that that
sort of facility could be provided. IE, diskfont ain't never called.

At least, that's the impression the AutoDocs left me with yesterday.
I could just be on 2.0 steroids. :)

>Most of the details you are asking about have to do with the
>diskfont.library and graphics.library.  

Okay, I mailed you some possibilities fo AmigaMail, here's an improvement.
One of the things I don't like about the Mac documentation is that seemingly
related topics are divided according to the internal system paradigm.
Wonderful, except that initially you aren't familiar with it.  While we're
still in the early stages with 2.0, can I ask a favor?

If we are talking about *fonts*, then anything to do with fonts ought to
be discussed, regardless of the library those functions are in.  In fact,
if we deal with XXX, then XXX ought to be discussed in all of its flavors.

E.G.  Let's say we talk about gadgets.  Peter Cherna writes a wonderful 
article about gadtools.  Except, how do I figure out whether or not to use
boopsi, struct Gadget *, etc?  

Another example might be ASL file-requester paired up with file pattern
matching.  IE. when to use a command interface, when to use a graphic
interface.

All sorts of examples, except I feel I'm rambling now. :)

>--John


David Navas                                   navas@cory.berkeley.edu
	2.0 :: "You can't have your cake and eat it too."
Also try c186br@holden, c260-ay@ara and c184-ap@torus

vinsci@nic.funet.fi (Leonard Norrgard) (06/28/91)

All this talk about bitmap font scaling reminds me that the 2.0 font
preferences program lacks a way to use the scaling feature. Sometimes,
eg. while doing a program demo for a larger audience, it would be good
to be able to scale up some font. While at it, add a "Test" button as
well, it's a little bit annoying to have to re-scan the fonts every
time (since the window always close when you select "Use").
  It would of course also be good to have possibilities (maybe in a
separate program) to manipulate and make disk fonts out of other
fonts. A new font editor?

-- Leonard

darren@cbmvax.commodore.com (Darren Greenwald) (06/28/91)

In article <1991Jun28.165053.24639@wehi.dn.mu.oz> baxter_a@wehi.dn.mu.oz writes:
>In article <22736@cbmvax.commodore.com>, darren@cbmvax.commodore.com (Darren Greenwald) writes:
>> What do you want to rotate?  The font data, or the output from Text()?
>>
>
>Well, either. I want to write sideways and make it look like its the same 
>font. It is a little harder than rotating a bit map (which is what I thought
>would do until one of you kind guys provided the code) because of the variable
>screen aspect ratio.
> 
>Regards Alan

Yes, its a bit harder, though you can start with a scaled font
(using a new call in diskfont.library to generate a scaled font
with adjusted aspect ratio, and rotate that).  The new 2.0 call
to look for is NewScaledDiskFont() in diskfont.library.  You give
it a TextFont structure (the font to scale), and a TextAttr structure
which has the new size, and possibly tags indicating the destination
X:Y aspect ratio.  Use that for drawing, and rotate the entire line.

Rotating the font data just doesn't work out well because fonts have
a fixed Y size, and variable X size.  The result of a rotation is
just not clear (even just a 90 degree rotation).

For example:


Lets suppose I have these 2 characters:

 X=5    X = 13
---------------------
|  *  | **       ** |
|     | * *     * * | 8 pixels 
|  *  | *  *   *  * | Tall
|  *  | *   * *   * |
|  *  | *    *    * |
|  *  | *         * |
|  *  | *         * |
|  *  | *         * |
---------------------

Do you rotate it like this?

 X = 5  X = 13
---------------------
|     |             |
|     | *********** | 8 pixels 
|     |           * | Tall
|*** *|         *   |
|     |         *   |
|     |           * | <- Notice that if we were to print the 'i', and
|     | *********** |    then move down and print the 'M' the 'i' wouldn't
|     |             |    be as tall as the 'M', and the spacing between
---------------------    characters is off.


Or do you rotate it like this?

 X = 8     X = 8
-------------------  
|        |********|  
|        |       *| 8 pixels  
|        |      * | Tall 
|****** *|     *  |  
|        |     *  | <- Notice that the characters were scaled to fit
|        |      * |    be non-proportional - the original Y size was
|        |       *|    use for the new X size, and the original X
|        |********|    size is ignored.  Our prop font is now mono-spaced.
-------------------  

Or do you rotate like so?

 X = 8          X = 8
-------------------
|        |        |
|        |********|
|****** *|       *|
|        |      * |
|        |     *  | 13 pixels
|        |    *   | Tall
|        |   *    |
|        |    *   |
|        |     *  | <- Pick the widest font as the final
|        |      * |    Y size; X size for all characters is original
|        |       *|    Y size; rotate 90 degrees; Pad thinner characters
|        |********|    with extra space to fit in new Y.
|        |        |
-------------------

		       A variation on this idea is to scale, instead of
		       Pad.  The most obvious problem with this last
		       scheme is that the final Y is arbitrary (based
		       on the widest character in the set, or maybe some
		       average.  The final data is also mono-spaced.



--------------------------------------------------------------
Darren M. Greenwald | Commodore-Amiga Software Engineering   
                    | USENET: uunet!cbmvax!darren                       
--------------------------------------------------------------
Quote: "It would be impossible to discuss the subject without
        a common frame of reference." - Spock

baxter_a@wehi.dn.mu.oz (06/28/91)

In article <22736@cbmvax.commodore.com>, darren@cbmvax.commodore.com (Darren Greenwald) writes:
> What do you want to rotate?  The font data, or the output from Text()?
>

Well, either. I want to write sideways and make it look like its the same 
font. It is a little harder than rotating a bit map (which is what I thought
would do until one of you kind guys provided the code) because of the variable
screen aspect ratio.
 
> I suspect what you want is to have a line of text rotated before
> its drawn in the layer - actually you can do that now if your
> willing to do the rotation (e.g., draw in an off-screen map,
> rotate, and BltTemplate() rotated image into visible layer).
> You could use DPAINT's rotation feature to get a feel for how fast, 
> or slow it might be done.
> 
> The bitmap scale routines actually create a new font with scaled data.
> There is therefore no performance penality for using a scaled font
> (other than the initial scaling).
> 
> Rotation of a line on the other hand has to be done on the fly.

Regards Alan

manes@vger.nsu.edu ((Mark D. Manes), Norfolk State University) (06/29/91)

In article <22744@cbmvax.commodore.com>, carolyn@cbmvax.commodore.com (Carolyn Scheppner - CATS) writes:
> In article <1124.2867637f@vger.nsu.edu> manes@vger.nsu.edu ((Mark D. Manes), Norfolk State University) writes:
>>...
>> [My original comments deleted..]
>>
> As long as the caller doesn't set the FPF_DESIGNED flag in
> TextAttr.Flags when calling OpenDiskFont(), 2.0 will scale the
> font to the size requested if the size is not available as
> a designed size.
>

Ah.. so it can be turned off!

> This will be bitmap scaling for non-outline fonts, and these can
> look pretty weird.  However, for upcoming outline fonts, it will
> look great.

Will outline fonts go into the fonts: area or will they appear 
elsewhere on the system?  Is it possible to tell whether a 
scaled font (bitmapped) or a outline font has been selected? 

> 
> As far as processing/filtering goes, I felt it was better to let
> people scale fonts by default - after all, the user has to explicitly
> do extra work to enter a size that is not presented in the list.
> I felt that the scrolling list implied "Here are the fonts I want you
> to chose from", and that a user who goes out of their way to enter
> something other than what is presented in the list 1. knows what
> they want and 2. can live with the consequences.

I see your point and agree.  I did not realize that it was not
actually the requestor doing the scaling but diskfont.library and
graphics.library so I guess the religous question is moot.  I like
your reasoning.

> 
> The application is always free to reject the font selected and
> force the user to choose again.
> 

Good!  My fears are removed.

> -- 
> ==========================================================================
>  Carolyn Scheppner -- Tech. Mgr. CATS - Commodore Amiga Technical Support
>  PHONE 215-431-9180 {uunet,rutgers}!cbmvax!carolyn  carolyn@commodore.com
> 
>  Signed characters are xenophobic.  
> ==========================================================================

-mark=
manes@vger.nsu.edu
"What this world needs is a good $5 plasma weapon..."