Solved

Using multiple fonts from C

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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…
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…

730 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