Solved

Using multiple fonts from C

Posted on 1997-04-30
3
219 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Hibernate methods 2 58
Identify font 3 63
wordappend challenge 8 85
Can not remove SSL certificate on iPhone 6 - iOS10.2 12 88
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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…

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now