A Flash Developer Resource Site

Results 1 to 18 of 18

Thread: Is this possible

Hybrid View

  1. #1
    Senior Member
    Join Date
    May 2016
    Posts
    451

    Is this possible

    hello all




    html text load variable from external text (question.txt)

    html text load StyleSheet from (styles.css)

    this is my swishmax folder




    styles.css code :

    PHP Code:
    {
    text-aligncenter;
    font-familyHKGrotesk-Light;
    font-size50px;
    color#FF0000;
    font-weightRegular;


    how can i use my font without install this font in my pc


    swishmax file: https://app.box.com/s/i5akae3jwkx1sq8pp2hh1h3ie4r1s3z4



    thanks for help

  2. #2
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    Hello, I will work on a convertor for the font file to work with swish directory.

    This is the interface for v1:

    download v1 (client)
    Last edited by AS3.0; 01-21-2023 at 12:32 PM.

  3. #3
    Senior Member
    Join Date
    May 2016
    Posts
    451
    this means : you can convert any font to work swishmax without installing this font

    if ok ===> please please explain how ?

  4. #4
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    Hello, soon it will work for swish, I am just sending you updates. Right now it can get the first signature from the font file.

    download v2 (client)


  5. #5
    Senior Member
    Join Date
    May 2016
    Posts
    451
    excuse me i dont understand





    my font: https://app.box.com/s/q70fvyy6mwlik7ev4jez0xpkoewg4mhy

  6. #6
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    Hi, update v3 can get the font table, maybe in a week it can be complete.

    download v3 (client)
    Last edited by AS3.0; 01-24-2023 at 12:23 AM.

  7. #7
    Senior Member
    Join Date
    May 2016
    Posts
    451
    Best wishes for you

  8. #8
    Senior Member
    Join Date
    May 2016
    Posts
    451
    Are you done with this project

  9. #9
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    I am about 30% done with it so far I finished the decompression algorithms for 6 tables, I could of been on 'post' but we got some work finished with the video player atleast, if you want the mp4 player controls to have a better drag I can work on that as well.

    HTML Code:
    OS/2
    cmap
    cvt
    fpgm
    head
    hhea
    I still have to do 16 decompression tables:

    HTML Code:
    ltag
    COLR
    CPAL
    maxp
    name
    post
    prep
    meta
    fvar
    GSUB
    GPOS
    GDEF
    kern
    hmtx
    loca
    CFF
    Last edited by AS3.0; 01-30-2023 at 03:53 PM.

  10. #10
    Senior Member
    Join Date
    May 2016
    Posts
    451
    Best wishes for you

  11. #11
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    Hi, v4 can convert the fonts & they are viewable in swish upside down currently.

    So this is the full script currently which is a basic viewer:
    PHP Code:
    onFrame(2){
    stop()
    function 
    drawGlyph(a){//Call to draw a glyph with variable a being the glyph number.
    _root.data_field.text=""
    _root.glyph.clear()
    _root.glyph.lineStyle(1,0x000000)
    _root.glyph.beginFill(0x000000)
    for(var 
    i=1;i<a.split("{").length;i++){//Loop through each command in the list.
    _root.data_field.text+=a.split("=")[i].split("\n")[1]+'\n'
    var drawing_function=a.split("=")[i].split("\n")[1].split(" ")[0]

    var 
    x1:Number=int(a.split("{")[i+1].split("}")[0].split("x:")[1].split(",")[0])//Coordinates for the drawing operations.
    var y1:Number=int(a.split("{")[i+1].split("}")[0].split("y:")[1].split(",")[0])
    var 
    x2:Number=int(a.split("{")[i+1].split("}")[0].split("x2:")[1].split(",")[0])
    var 
    y2:Number=int(a.split("{")[i+1].split("}")[0].split("y2:")[1].split(",")[0])

    if(
    drawing_function=="moveTo"){//If moveTo, do a move to drawing operation, etc..
    _root.glyph.moveTo(x1,y1)
    }
    if(
    drawing_function=="lineTo"){
    _root.glyph.lineTo(x1,y1)   
    }
    if(
    drawing_function=="curveTo"){
    _root.glyph.curveTo(x1,y1,x2,y2)    
    }
    }
    _root.glyph._x=60//Reposition the glyph.
    _root.glyph._y=60
    _root
    .glyph._width=50//Resize the glyph.
    _root.glyph._yscale=_root.glyph._xscale
    _root
    .glyph._width-=_root.glyph._width*3
    _root
    .glyph._rotation-=180
    }



    _root.createEmptyMovieClip("glyph",this.getNextHighestDepth());//Create empty movie clip to draw the glyph inside.

    var loaded_str=""
    var glyph_number:Number=4
    var load_vars_3 = new LoadVars();
    load_vars_3.onData = function(e) {
    _root.data_field2.text"This font file has: " +(e.split("glyph").length-1) + " glyphs."
    loaded_str=e;

    drawGlyph(loaded_str.split("glyph")[4]);//Once the font file is loaded, draw a glyph.
    }

    onEnterFrame=function(){//On EnterFrame draw a glyph when the input field has changed.
    if(glyph_number!=int(_root.data_field3.text)&&_root.data_field3.text.length>0){
    glyph_number=int(_root.data_field3.text)
    drawGlyph(loaded_str.split("glyph")[glyph_number]);
    }
    }
    load_vars_3.load("swish_font.txt");//Load the converted swish font file here.




    download v4 (client)
    Last edited by AS3.0; 02-14-2023 at 02:02 PM.

  12. #12
    Senior Member
    Join Date
    May 2016
    Posts
    451
    excuse me
    can you explain the way by video
    i cant use it

  13. #13
    Senior Member
    Join Date
    May 2016
    Posts
    451
    i want use my font in swish without install the font in pc

  14. #14
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    Hello, this is a new release you can embed .ttf fonts by converting them to .txt.

    This is not a normal feature in AS2 since it is an operating system feature so it required 3000 lines of program for the convertor, I will send you another update next week.



    download v4 (swish)

  15. #15
    Senior Member
    Join Date
    May 2016
    Posts
    451
    I succeeded in converting the font to text, but how do I use it?

    I hope you are not angry with me because I do not understand

  16. #16
    Senior Member
    Join Date
    May 2016
    Posts
    451
    Important clarification
    The Arabic language is not the same as the English language
    The English language writes each letter next to the other, but the Arabic language writes the letter and connects to the other according to a different system and rules

  17. #17
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    I will not be sending you anymore messages, it looks like you do not understand.

  18. #18
    Senior Member
    Join Date
    May 2016
    Posts
    451
    Excuse me, my friend
    Actually I don't understand
    Let me put the question to you in a clear way
    Is at the end of this project
    I will be able to write and then choose my font in swish

    The reason for this is that the swish does not support the Arabic language except with one font,

    only ( _sans )

    So I was very happy with this project
    And I finally said I will write Arabic

    Finally,
    accept my apologies for the misunderstanding

    happy day

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center