persian

Support for Farsi/Arabic texts in Three.js

不想你离开。 提交于 2021-02-08 09:01:09
问题 I need to show some text in Persian/Arabic language. I loaded a font including characters and I used TextGeometry to create a text on the scene: var loader = new THREE.FontLoader(); loader.load('B Zar_Regular.js', function (font) { var textGeo = new THREE.TextGeometry('سلام!', { font: font, size: 1, height: 0.05, curveSegments: 12, }); var material = new THREE.MeshNormalMaterial(); var textMesh = new THREE.Mesh(textGeo, material); textMesh.position.x = 15; scene.add(textMesh); }); I was

Support for Farsi/Arabic texts in Three.js

馋奶兔 提交于 2021-02-08 09:01:06
问题 I need to show some text in Persian/Arabic language. I loaded a font including characters and I used TextGeometry to create a text on the scene: var loader = new THREE.FontLoader(); loader.load('B Zar_Regular.js', function (font) { var textGeo = new THREE.TextGeometry('سلام!', { font: font, size: 1, height: 0.05, curveSegments: 12, }); var material = new THREE.MeshNormalMaterial(); var textMesh = new THREE.Mesh(textGeo, material); textMesh.position.x = 15; scene.add(textMesh); }); I was

How to create PDF containing Persian(Farsi) text with reportlab, rtl and bidi in python

99封情书 提交于 2020-05-09 05:09:05
问题 I've been trying to create a PDF file from content that can be English, Persian, digits or a combination of them. there is some problems with Persian texts like: "این یک متن فارسی است" ۱- the text must be written from right to left 2- there is a difference between characters in different positions in the word (meaning that characters change their shape according to their surrounding characters) 3- because the sentence is read from right to left then the normal textwrap doesn't work correctly.

.NET How to parse a Persian / Farsi date string (Jalali calendar) into a DateTime object?

谁都会走 提交于 2020-01-20 17:40:31
问题 I've run across several great code libraries for converting a Persian (Jalali calendar) date to a Gregorian date. However, my original source is a string, not a DateTime object. There doesn't seem to be official support in the .NET framework for parsing dates using the Persian calendar (if I'm wrong, please show me!). My goal: string persianDateString="1390/02/07"; DateTime persianDateTime = MyPersianParser.Parse(persianDateString, "yyyy/mm/dd"); And of course, some dates may use word names

Material component persian datepicker in angular 2

扶醉桌前 提交于 2020-01-11 05:12:27
问题 Angular2 Material Component has a DatePicker that shows the date in the default format. And only support change local to "fa-IR". How can I format it to show Persian Date? 回答1: The following steps should help: 1 : load all required modules in module.ts: import { MatDatepickerModule, NativeDateAdapter, DateAdapter, MAT_DATE_FORMATS,MAT_DATE_LOCALE} from '@angular/material'; 2 : install jalali-moment using NPM: npm install jalali-moment 3 : import jalali date to your app: import * as moment

python uppercase and ascii in persian text

非 Y 不嫁゛ 提交于 2020-01-05 20:00:54
问题 I change this code to work in persian. My code returns: Key: Text is too short to analyze Text: and doesn't return key and decrypt text. Is it anything wrong with uppercase or ascii in persian text? What can I do? # -*- coding: utf-8 -*- from string import uppercase from operator import itemgetter def vigenere_decrypt(target_freqs, input): nchars = len(uppercase) ordA = ord(u"ا") sorted_targets = sorted(target_freqs) def frequency(input): result = [[c, 0.0] for c in uppercase] for c in input:

Converting Binary Data to String [In Persian]

佐手、 提交于 2020-01-05 07:58:14
问题 I am working on a system that needs to read a binary file containing certain Persian names/stock instruments. I need to convert the binary data into string to be used in further processes. I have googled it and haven't really found a solution to my problem. Anyone here who has worked in such a scenario or knows how to tackle such a problem? Here is the code that I am using to convert the bytes to string (simple as it maybe): byte[] data = binaryReader.ReadBytes(amountOfData); string

Converting Binary Data to String [In Persian]

孤者浪人 提交于 2020-01-05 07:58:08
问题 I am working on a system that needs to read a binary file containing certain Persian names/stock instruments. I need to convert the binary data into string to be used in further processes. I have googled it and haven't really found a solution to my problem. Anyone here who has worked in such a scenario or knows how to tackle such a problem? Here is the code that I am using to convert the bytes to string (simple as it maybe): byte[] data = binaryReader.ReadBytes(amountOfData); string

Transforming string to UTF8

亡梦爱人 提交于 2020-01-04 14:19:46
问题 I have a string that I receive from email via C# and I want to display it in a correct format. I know the encoding in coming in as Encoding.Default , According to this answer I have to convert it to utf8, So I tried this code: byte[] bytes = Encoding.Default.GetBytes(input); string strResult = Encoding.UTF8.GetString(bytes); It works, but it can't convert some characters: Actually in web mail interface Original string is: باسلام همکار گرامی شماره 53018 مربوط به دبیرخانه ستاد می باشد لطفا