Jump to content



Photo
* * * * * 1 votes

Font :: Program for fonts other than font calculator.

Persian Font

  • Please log in to reply
6 replies to this topic

#1 saeedgolabli

saeedgolabli

    Newbie

  • Members
  • Pip
  • 7 posts

  • Calculators:
    algebra fx2.0 pluss
    9860 gii
    cp300
    cp400

Posted 18 September 2018 - 09:00 PM

Hi
Thank you very much if you answer my question.
How can I write an application that is in the "SDK" environment with the output of Persian?
I really need this very much. Please help me.
Many thanks.

I use the calculator 9860 gii sd



#2 saeedgolabli

saeedgolabli

    Newbie

  • Members
  • Pip
  • 7 posts

  • Calculators:
    algebra fx2.0 pluss
    9860 gii
    cp300
    cp400

Posted 21 September 2018 - 10:04 AM

Does anyone have any idea or plan? : icon_e_geek.gif icon_clap.gif :rolleyes:


:blush:

Does anyone have any idea or plan? : icon_e_geek.gif icon_clap.gif :rolleyes:

please help me....


I want this for a Add-in program.
I want to display messages in the program. For example, in Persian, display "Enter number" or provide explanations about the program's responses in Persian.
If it can be used for input numbers from the Persian font, it is perfect and perfect.
ممنونم که وقت گذاشتید.. icon_e_smile.gif



#3 GodOfCows

GodOfCows

    Casio Addict

  • Members
  • PipPipPip
  • 79 posts
  • Gender:Male

  • Calculators:
    fx-9860gii, fx-9750gii, TI-92, TI-89, TI-83 Plus

Posted 21 September 2018 - 12:27 PM

I got no idea on how someone would accomplish something like this. I can't think of any text editors that support Persian, so you will probably have to make your own, which wouldn't be too hard (I think). I also don't know how Persian is structured.

 

If a text editor isn't what you want, and if you are wanting to just make a add-in programmed in persian, then I think that would be easy (but you would have to define the letters yourself)


Edited by GodOfCows, 21 September 2018 - 12:29 PM.

  • saeedgolabli likes this

#4 saeedgolabli

saeedgolabli

    Newbie

  • Members
  • Pip
  • 7 posts

  • Calculators:
    algebra fx2.0 pluss
    9860 gii
    cp300
    cp400

Posted 21 September 2018 - 09:15 PM

I got no idea on how someone would accomplish something like this. I can't think of any text editors that support Persian, so you will probably have to make your own, which wouldn't be too hard (I think). I also don't know how Persian is structured.

 

If a text editor isn't what you want, and if you are wanting to just make a add-in programmed in persian, then I think that would be easy (but you would have to define the letters yourself)

Thank you dear friend
I agree with your statements. For example, for each letter, a pixel block is 8 * 8. And with the command that the point draws, each of the letters is drawn in each block.
But how do I apply it to my program?
What came to my mind is to define a function for each block of 8 × 8 characters. Then, to display a word or sentence, call a number of blocks and display it with appropriate library functions.
  Is this a good solution?


#5 GodOfCows

GodOfCows

    Casio Addict

  • Members
  • PipPipPip
  • 79 posts
  • Gender:Male

  • Calculators:
    fx-9860gii, fx-9750gii, TI-92, TI-89, TI-83 Plus

Posted 22 September 2018 - 02:24 AM

(Sorry if I rambled on, or if I got anything wrong, I'm not a master)

 

I believe I know what you are wanting, which is just to have a equivelent function to Print.

 

I made this little sprite drawing function a while ago. There are a couple of downsides to this solution though. 1: You would have to define the letters yourself and 2: There might be a simpler way to implement this function. 

 

If #2 is a problem for you, then I would check out MonochromeLib, which is supposedly the fastest drawing library for the casio calculators. https://wiki.planet-...n/MonochromeLib

 

Anyways, here is the function that draws the bitmap: 

void sprite_draw(unsigned char x, unsigned char y, unsigned char *src)
{
    /*
        Example:

        const unsigned char test[] = {
            10, //how big the image is, 10 = 10x10, 8 = 8x8 ect


            // This is the actual image, 1 = pixel on and 0 = pixel off. Please note you would have to change this if you change the previous number (10 in this case)
            0,0,0,0,0,0,0,0,0,0,
            0,0,0,0,0,0,0,0,0,0,
            0,0,1,0,0,0,0,1,0,0,
            0,0,0,1,0,0,1,0,0,0,
            0,0,1,1,1,1,1,1,0,0,
            0,1,1,0,1,1,0,1,1,0,
            1,1,1,1,1,1,1,1,1,1,
            1,0,1,1,1,1,1,1,0,1,
            1,0,1,0,0,0,0,1,0,1,
            0,0,0,1,0,0,1,0,0,0
        };


    */

    unsigned char a,b;
    unsigned short i;
    a = b = 0;


    for (i = 1; i <= src[0]*src[0]; i++)
    {


        if (a >= src[0])
        {
            b++;
            a = 0;
        }


        if (src[i])
            Bdisp_SetPoint_VRAM(x+a,y+b,1); //If you want to erease the image, just set 1 to 0


        a++;
    }
}

To implement this in a function to draw an entire string, a function would probably have to read a string (your persian) and since all characters are just ANCSII numbers, you can then call the sprite drawer to draw the corresponding letter. 

Ex:

void print_test(unsigned char x, unsigned char y, unsigned char *src)

{

//shift through the string, from letter to letter and call the sprite_draw for the correspondant. Would also need to accomedate the x axis.

}

 

print_text(x,y,"ABc"); //in reality, this 'string is actually just an array, equivelent to char string[] = 0x41, 0x42, 0x63;


  • saeedgolabli likes this

#6 sentaro21

sentaro21

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 22 September 2018 - 12:54 PM

Hi,
The display of bitmap can use WriteGraph of SDK library, but it is easy to use ML_bmp_8_or( of MonchromeoLib.
MonchromeoLib's document has a simple 8*8 bitmap sample program. :)
 
 
Because I'm a developer of C.Basic, I suggest a different method. ^_^
If your application is not necessary high speed of SDK.
It is easy to use the external font in C.Basic, 
You only edit the BMP file of the font.
 
Here is sample of external font.
 
ARABIAN_sample1.png
 
ARABIAN_sample2.png
 
 
Because I'm a Japanese,
I'm sorry I do not understand Persian at all.
This sample uses an Arabic font of MSX-PC.
 

  • saeedgolabli likes this

#7 saeedgolabli

saeedgolabli

    Newbie

  • Members
  • Pip
  • 7 posts

  • Calculators:
    algebra fx2.0 pluss
    9860 gii
    cp300
    cp400

Posted 24 September 2018 - 09:37 PM

Thank you dear GodOfCows and sentaro21
Your advice was very valuable and useful. And I used it.
I am very pleased that you have greeted me and I enjoyed your science.
You are a professor. Your ideas were very good.
  I could find the way. Now I have to take time and complete this part of my project.
I hope you are good luck. Good teachers, GodOfCows and sentaro21. :wub:



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users