Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6833731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:00:53+00:00 2026-05-26T23:00:53+00:00

I’m using the Fungen framework for Haskell and there is a function that uses

  • 0

I’m using the Fungen framework for Haskell and there is a function that uses BitmapFonts. The thing is, that the only BitmapFonts I can use are the ones that come with GLUT, here is the data:

data BitmapFont
= Fixed8By13
| Fixed9By15
| TimesRoman10
| TimesRoman24
| Helvetica10
| Helvetica12
| Helvetica18

These fonts are very small for my application, and I want to use another BitmapFont, not just these, or make one of these bigger. How can I do it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:00:54+00:00Added an answer on May 26, 2026 at 11:00 pm

    Here’s the source of putGameText:

    putGameText :: [Text] -> IO ()
    putGameText [] = return ()
    putGameText ((text,font,(x,y),r,g,b):ts) = do
        loadIdentity
        color (Color3 r g b)
        rasterPos (Vertex2 x y)
        renderString font text
        putGameText ts
    

    As I understand it, FunGEn’s Text type constrains font to a fixed-size BitMapFont:

    type Text = (String, BitmapFont, (GLdouble, GLdouble), GLclampf, GLclampf, GLclampf)
    

    but renderString can also take a StrokeFont, which is even more limited in font family but responds to standard OpenGL scaling/transformation/rotation.

    So, a good start might be to make myPutGameText that accepts a StrokeFont-capable MyText and does a scaling transform before rendering. Here’s some pseudo-code which I hope someone will correct:

    type MyText = (String, StrokeFont, (GLdouble, GLdouble), GLclampf, GLclampf, GLclampf)
    
    myPutGameText :: [MyText] -> (GLDouble,GLDouble,GLDouble) -> IO ()
    myPutGameText [] _ = return ()
    myPutGameText ((text,font,(x,y),r,g,b):ts) (sx,sy,sz) = do
        loadIdentity
        preservingMatrix $ do
          scale sx sy sz
          color (Color3 r g b)
          rasterPos (Vertex2 x y)
          renderString font text
          putGameText ts
    

    For richer font rendering, the answer is probably to integrate something like FTGL.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I need a function that will clean a strings' special characters. I do NOT
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.