1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Please help to display Japanese text with JS font

Discussion in 'HTML & Website Design' started by toraniz, Mar 31, 2015.

  1. #1
    I do not know about html ,I have a JS folder which contains Java and html file read from there to display text font Myriad_Pro_600.font.js .
    it is works well for English text but not displaying the Japanese text.

    <h4 class="search" style="font-weight: 900; font-style: italic; margin-top:-20px; margin-left: -30px; font-size: 27pt" align="left">
    Japanese TEXT Japanese TEXT Japanese TEXT</h4>
    Can some one help me how can I display japanese text in above .

    Many Thanks
     
    toraniz, Mar 31, 2015 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    Does the font face support Japanese character glyphs? If not, you need to use one that does. There may be other factors, but that's the first thing to check. I don't know why you'd use javascript (not Java; that's a different animal) to create content. Try using plain html and arial. That should work. Don't forget to use utf-8 character encoding.

    You did not show us what is displayed, which might have improved debugging.
     
    Last edited: Mar 31, 2015
    kk5st, Mar 31, 2015 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #3
    1) JAVA != JavaScript. Java is to JavaScript as Ham is to Hamburger.

    2) what the devil does ANY sort of "JS" (which I'm assuming you mean JavaScript) have to do with your FONTS?!? That's CSS' job unless you are using something utterly and completely jacktarded and decade out of date like Cufon or SIFR.

    3) static style in the markup, are you REALLY so deep in structure that's an H4 or are you just using headings for default appearance?

    4) Avoid numbered font weights with webfonts, particularly mis-matching them as it can make the webfont refuse to be used in most browsers. (really numbered font-weights are a train wreck best avoided anyways!)

    5) do you actually HAVE a sample of the japanese text to be shown? Are you saving as UTF-8 so you actually HAVE japanese text support?

    6) H4 has no align property in modern documents -- in fact "align" has NO business on anything other than TH or TD any time after 1997!

    Your code is a mess, your question is gibberish/malformed and your terminology is off -- makes it very hard to provide a meaningful answer that's anything more than "throw that away and please just explain what it is you are trying to do!"

    Basically if that markup is part of anything written after 2003, I would suggest throwing the entire site in the trash and starting over from scratch -- that little snippet ALONE tells me that clear as day.
     
    deathshadow, Mar 31, 2015 IP
  4. toraniz

    toraniz Member

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #4
    kk5st,Thanks for info.
    I have no any clue about all the info you have mentioned,
    I have not created any css code for my page,actually it is a ready template which it contains all the css code and JS folder comes with it.so I tried to change and put my Japanese text into file ...
    as you asked ,NO it does not display in the browser view anything for the the Japanese text I put.
    the js folder contains file as below:
    cufon-yui.js
    mGopen_moderna_700_font.js
    myriad_pro_600_font.js

    and below are the css link inside the html file :
    <link href="default.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="js/cufon-yui.js"></script>
    <script type="text/javascript" src="js/Myriad_Pro_600.font.js"></script>
    <script type="text/javascript">
    Cufon.replace('h1', { fontFamily: 'Myriad Pro' });
    Cufon.replace('h2', { fontFamily: 'Myriad Pro' });
    Cufon.replace('h3', { fontFamily: 'Myriad Pro' });
    Cufon.replace('h4', { fontFamily: 'Myriad Pro' });
    Cufon.replace('h5', { fontFamily: 'Myriad Pro' });
    Cufon.replace('h6', { fontFamily: 'Myriad Pro' });
    </script>

    I do not know if I should give more info.
     
    toraniz, Mar 31, 2015 IP
  5. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #5
    You should get someone who knows what they're doing to fix this for you, because what you have is gibberish, and outdated (as @deathshadow already pointed out), and Myriad Pro does NOT support Japanese text. Have a look at the complete glyph-set for Myriad* via Google
     
    PoPSiCLe, Apr 1, 2015 IP