Announcement

Collapse
No announcement yet.

Text with subscript and apex characters

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Text with subscript and apex characters

    Hi to all.
    I need to write units of measure that include subscript and apex characters. For example the unit of measurement of chlorine is Cl2, where 2 is written subscript.
    It is not a problem if the writing is fixed, because with "gfx_MoveTo (x, y)" I can correctly position the text and write it with a different font.
    The problem arises when the writing is not fixed, so the position of the apex or subscript character changes.
    For the superscript character I find a simple solution:
    Code:
        p := str_Ptr(UnitaMisura[UM]);
        for (i := 0; i < 4; i++)
            j := str_GetByte(p + i);
            if (j == '3')
                k := AltCar / 2;
                txt_Height(k);
            endif
            print ([CHR]j);
        next
    I memorize the initial height of the text (higher than one) in "AltCar" before start the write, and, when I find the character "3", I reduce the height, and it works properly (example: unit of measurement cubic meters). The example must be perfected to return to the initial height of the characters after having printed the apex character.
    Can anyone suggest me a simple solution to create subscript characters too?
    Best regards, Valter

  • #2
    Hi Valter,

    Please have a look at this forum thread:
    https://forum.4dsystems.com.au/node/...9356#post69356

    Best regards,
    Sherwin

    Comment


    • #3
      Hi Sherwin
      Perfect solution for me, like "GLCDFontCreator" I can create all the symbol I need!
      But I encountered a problem, I put it on your post # 69356.
      Many thanks!
      Best regards, Valter

      Comment


      • #4
        Hi Bump
        Maybe your problem is discussed at post # 69356.
        Best regards, Valter

        Comment

        Working...
        X