Solved

Using multiple fonts from C

Posted on 1997-04-30
3
227 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
  • 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 200 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How do I customize my Standard Colors in PowerPoint 2010? 6 51
notReplace  challenge 53 131
tripleUp challenge 7 79
Problem to open Excel file 15 135
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
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…

809 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