te')); return $arr; } /* 遍历用户所有主题 * @param $uid 用户ID * @param int $page 页数 * @param int $pagesize 每页记录条数 * @param bool $desc 排序方式 TRUE降序 FALSE升序 * @param string $key 返回的数组用那一列的值作为 key * @param array $col 查询哪些列 */ function thread_tid_find_by_uid($uid, $page = 1, $pagesize = 1000, $desc = TRUE, $key = 'tid', $col = array()) { if (empty($uid)) return array(); $orderby = TRUE == $desc ? -1 : 1; $arr = thread_tid__find($cond = array('uid' => $uid), array('tid' => $orderby), $page, $pagesize, $key, $col); return $arr; } // 遍历栏目下tid 支持数组 $fid = array(1,2,3) function thread_tid_find_by_fid($fid, $page = 1, $pagesize = 1000, $desc = TRUE) { if (empty($fid)) return array(); $orderby = TRUE == $desc ? -1 : 1; $arr = thread_tid__find($cond = array('fid' => $fid), array('tid' => $orderby), $page, $pagesize, 'tid', array('tid', 'verify_date')); return $arr; } function thread_tid_delete($tid) { if (empty($tid)) return FALSE; $r = thread_tid__delete(array('tid' => $tid)); return $r; } function thread_tid_count() { $n = thread_tid__count(); return $n; } // 统计用户主题数 大数量下严谨使用非主键统计 function thread_uid_count($uid) { $n = thread_tid__count(array('uid' => $uid)); return $n; } // 统计栏目主题数 大数量下严谨使用非主键统计 function thread_fid_count($fid) { $n = thread_tid__count(array('fid' => $fid)); return $n; } ?>javascript - Using Hindi Font in HTML Websites - Stack Overflow
最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Using Hindi Font in HTML Websites - Stack Overflow

programmeradmin3浏览0评论

I want to create a website in hindi font. for this i have tried @font-family: "Kruti Dev" etc. but I feel that this website will require hindi font on every user's pc.

What's the best way to use hindi font on a website ?

I want to create a website in hindi font. for this i have tried @font-family: "Kruti Dev" etc. but I feel that this website will require hindi font on every user's pc.

What's the best way to use hindi font on a website ?

Share Improve this question edited Jul 10, 2017 at 6:46 Guillaume 5863 silver badges21 bronze badges asked Jul 10, 2017 at 6:41 Vishal GoyalVishal Goyal 211 gold badge1 silver badge2 bronze badges 2
  • What about downloading the font then include it in your project? So that user that do not have the font can still view it in "Hindi" font – Carl Binalla Commented Jul 10, 2017 at 6:43
  • 1 Possible duplicate of css font family issue, what if the font is not available on client side – Narayan Commented Jul 10, 2017 at 6:45
Add a ment  | 

7 Answers 7

Reset to default 4

use meta tag

<html>
  <head>
    <meta charset="UTF-8" />
    <title>Hindi Font का उपयोग</title>
  </head>
  <body>
    <h1>We Can Use Hindi Font</h1>
    <p>इस Page में हम हिन्दी भाषा का उपयोग करेंगे</p>
    <h1>We Can also use Hindi Hex Code</h1>
    <p>&#x0907;&#x0938;&nbsp;Page&nbsp;&#x092E;&#x0947;&#x0902;&nbsp;&#x0939;&#x092E;&nbsp;&#x0939;&#x093F;&#x0928;&#x094D;&#x0926;&#x0940;&nbsp;&#x092D;&#x093E;&#x0937;&#x093E;&nbsp;&#x0909;&#x092A;&#x092F;&#x094B;&#x0917;&nbsp;&#x0915;&#x0930;&#x0947;&#x0902;&#x0917;&#x0947;</p>
    
    <a href="https://www.anirdesh./gujarati/hindi-unicode.php"><h1>Hindi Code Entity</h1></a>
  </body>
</html>

One way that I can think of is to use @font-face. But you must download the font first then include it in the files of the website

@font-face {
    font-family: KrutiDev;
    src: url(path/to/kruti_dev.woff);
}

use meta tag in head section

<html>
  <head>
    <meta charset="UTF-8" />
    <title>Hindi Font का उपयोग</title>
  </head>
  <body>
    <h1>We Can Use Hindi Font</h1>
    <p>इस Page में हम हिन्दी भाषा का उपयोग करेंगे</p>
    <h1>We Can also use Hindi Hex Code</h1>
    <p>&#x0907;&#x0938;&nbsp;Page&nbsp;&#x092E;&#x0947;&#x0902;&nbsp;&#x0939;&#x092E;&nbsp;&#x0939;&#x093F;&#x0928;&#x094D;&#x0926;&#x0940;&nbsp;&#x092D;&#x093E;&#x0937;&#x093E;&nbsp;&#x0909;&#x092A;&#x092F;&#x094B;&#x0917;&nbsp;&#x0915;&#x0930;&#x0947;&#x0902;&#x0917;&#x0947;</p>
    
    <a href="https://www.anirdesh./gujarati/hindi-unicode.php"><h1>Hindi Code Entity</h1></a>
  </body>
</html>

You can develop a website in Hindi – or any other language – by embedding custom dynamic fonts. Although, embedding custom fonts has always been a painful experience for web developers and designers, but the latest trends in web design brought the idea back to life with new techniques. In this article you’ll find the modern techniques that may help you with the topic at hand, however, one must note that no particular technique is perfectly patible with every browser and each has its pros and cons.

You should definitely read this -

http://www.zapbuild./bitsntricks/how-to-develop-a-website-in-hindi/

Get the text you want in Hindi using google translate,I usually do it by typing sentences in English and get its translation in the desired language. And all you need to do is include the following line in the head tag.

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!DOCTYPE html>
<html lang="mr">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <meta http-equiv="content-language" content="mr">  
        
    <style type="text/css">  
        @font-face {
            font-family: KrutiDev;
            src: url(fonts/marathi/k010/k010.woff);
        }
        /*Download Zip file for KrutiDev woff font from internet, Unzip it, Paste 
          the folder in your website folder. I have taken k010*/
    </style>
</head>
<body>
    <textarea name="paragraph1" id="paragraph1"  rows="5" cols="80" 
     style="font-family: KrutiDev;color:#003399;">                                                        
    </textarea>
</body>
</html>

Use google web fonts 'Ek-Mukta': link here

<link href="https://fonts.googleapis./css?family=Ek+Mukta" rel="stylesheet">
font-family: 'Ek Mukta', sans-serif;
发布评论

评论列表(0)

  1. 暂无评论