[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Using multiple fonts from C

Posted on 1997-04-30
3
Medium Priority
?
251 Views
Last Modified: 2013-12-26
I am about half way through the book “Learn C on the Macintosh” and I was trying to do a project that involved making a random draw of four bridge hands and printing them out.  I wanted to print the “Symbol” font characters for spades, hearts, diamonds, and clubs but I cannot figure out how to use more than one font in a program.  I had seen the SIOUXSettings and customization documentation in the MW C Library Ref. but it says the you need to make any changes to SIOUXSettings before any call to standard I/O functions are made.  It also says that you cannot then change the SIOUXSettings.  For my project I wanted to print something like:

North
       (Symb. for Spade)   A  K  J 10  8
       (Symb. for Heart)   8  3  2

This requires a mixture of at least two fonts (e.g., symbol and monaco) in a single SIOUX window.  
0
Comment
Question by:jpresley043097
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:jpresley043097
ID: 1291448
How am I supposed to know how hard this question is.  I am a Newbie at this to begin with and if I had an idea how to solve the problem I would not be looking for expert advice.  Nevertheless, I do appreciate your service and I hope my 200 points does justice to the question.
0
 
LVL 1

Expert Comment

by:PAD
ID: 1291449
A SIOUX application is a VERY simple application skeleton. In fact its used as a UNIX interface (just handle inpout and output in a console).
There is no simple way to use multiple fonts in a SIOUX application because sioux create a simple Text pointer which is limited to 32767 characters and no font changes.
To use multiple fonts in a TextView you must add 'styl' ressources, and that's not possible with sioux.

Printf is an ANSI routine that only know to print out a string to the console, but as a console has no font assigned there is no way to specify a particular font and even more 2 fonts

The only way is to use QuickDraw (drawstring, drawtext, setfont and so on...)

To do that you need to make a step and create your own application without help from sioux. A good way to do that without lot of Reading (InsideMac) is to use a framework (MacApp or PowerPlant) made it simple... but before continue with "Learning C on MAc"
0
 
LVL 1

Accepted Solution

by:
PAD earned 400 total points
ID: 1291450
A SIOUX application is a VERY simple application skeleton. In fact its used as a UNIX interface (just handle inpout and output in a console).
There is no simple way to use multiple fonts in a SIOUX application because sioux create a simple Text pointer which is limited to 32767 characters and no font changes.
To use multiple fonts in a TextView you must add 'styl' ressources, and that's not possible with sioux.

Printf is an ANSI routine that only know to print out a string to the console, but as a console has no font assigned there is no way to specify a particular font and even more 2 fonts

The only way is to use QuickDraw (drawstring, drawtext, setfont and so on...)

To do that you need to make a step and create your own application without help from sioux. A good way to do that without lot of Reading (InsideMac) is to use a framework (MacApp or PowerPlant) made it simple... but before continue with "Learning C on MAc"
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question