Skip to content
This repository was archived by the owner on Jun 28, 2021. It is now read-only.

Added Nafees font for Urdu and Punjabi translation #486

Merged
merged 1 commit into from
Nov 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/components/Ayah/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ export default class Ayah extends Component {
return array.map((content, index) => {
const arabic = new RegExp(/[\u0600-\u06FF]/);
const character = content.text;
const isArabic = arabic.test(character);
const isArabic = arabic.test(character);
const lang = (content.name || content.resource.name).replace(/\s+/g, '-').toLowerCase();

return (
<div
Expand All @@ -76,7 +77,7 @@ export default class Ayah extends Component {
>
<h4 className="montserrat">{content.name || content.resource.name}</h4>
<h2 className={`${isArabic ? 'text-right' : 'text-left'} text-translation times-new`}>
<small dangerouslySetInnerHTML={{__html: content.text}} className="times-new" />
<small dangerouslySetInnerHTML={{__html: content.text}} className={`${styles[lang] || 'times-new'}`} />
</h2>
</div>
);
Expand Down
6 changes: 6 additions & 0 deletions src/components/Ayah/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,16 @@
color: $light-green;
margin-bottom: 5px;
}

h2{
margin-top: 5px;
margin-bottom: 25px;
}

.urdu, .punjabi{
direction: rtl;
font-family: 'Nafees';
}
}

.word_font{
Expand Down
12 changes: 12 additions & 0 deletions src/styles/fonts/_fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@
font-style: normal;
}

@font-face {
font-family: 'Nafees';
src: url('../../static/fonts/nafees/nafees-nastaleeq-webfont.eot?#iefix') format('embedded-opentype'),
url('../../static/fonts/nafees/nafees-nastaleeq-webfont.woff') format('woff'),
url('../../static/fonts/nafees/nafees-nastaleeq-webfont.ttf') format('truetype'),
url('../../static/fonts/nafees/nafees-nastaleeq-webfont.svg#NafeesRegular') format('svg');
font-weight: normal;
font-style: normal;
}



/* This triggers a redraw in IE to Fix IE8's :before content rendering. */
html:hover [class^="ss-"]{-ms-zoom: 1;}

Expand Down
Binary file added static/fonts/nafees/nafees-nastaleeq-webfont.eot
Binary file not shown.
1,036 changes: 1,036 additions & 0 deletions static/fonts/nafees/nafees-nastaleeq-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/fonts/nafees/nafees-nastaleeq-webfont.ttf
Binary file not shown.
Binary file not shown.