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

  • SEARCH
  • Home
  • 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 8518059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:52:44+00:00 2026-06-11T05:52:44+00:00

I am Working on some bitmap fonts. The idea here is that i am

  • 0

I am Working on some bitmap fonts.
The idea here is that i am given 2 files
input.txt and font .txt.
I have to read a string from input.txt file and transform it using the font.txt and print the corresponding output to another file output.txt.
each character in font.txt is represented by a grid of 16×8. e.g.:

"A"=  
0x00,  
0x00,  
0x10,  
0x38,  
0x6c,  
0xc6,  
0xc6,  
0xfe,  
0xc6,  
0xc6,  
0xc6,  
0xc6,  
0x00,  
0x00,  
0x00
0x00

Can Someone please Just give me an idea how to load the above format stored in a file into a data structure.

  • 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-06-11T05:52:46+00:00Added an answer on June 11, 2026 at 5:52 am

    Take a look at this SO solution to see how to read line by line in c.

    I’m assuming you work with ASCII and your array size is constant. You can simply check for the " at the beginning of each line, in which case you can assume it’s an identifier for your letter, else you read the values line by line into the 16×8 array, dropping the , at the end if there is one.

    Checking for the " can simply be done by a direct comparison since it’s an ascii character.

    if (myline[0] == 34) {...};
    

    Getting the letters could be done the same way:

    char myletter = myline[1];
    

    You could also use scanf to parse your line formatted. Also if you have to possibility to work in C++, it will make your life a lot easier since you’ll have access to higher level methods.

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

Sidebar

Related Questions

I am working on some bitmap fonts. The idea here is that I am
I have some working code that uses IImgCtx to load images, but I can't
I seem to have a sepia tone that is almost working properly. For some
I'm working on some image transformations using ASP.NET/C#/GDI+. I have a method that looks
I'm working some code that inserts csv rows into an SQLite database using Python.
Working on some tweaks for a build script, I noticed that the output from
I have some working code with a crutch to add BOM marker to a
When working on some Javascript for a web application, I noticed that I had
I am working with delphi. I have TImage, to which I assign a bitmap.
I have a set of classes that represent the storage of a font format

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.