Skip to main content

Lipi aka font

 I wanted to add hover text with English meaning for Sanskrit words - as the website greenmsg does. I had done it earlier. But forgot how to. Then google told me after a while - that it is title attribute with span tag - because for each word.

Then came the problem of typing the whole Sanskrit text. I do have Hindi keyboard - Devnagari keyboard and almost have mastered it. But of course it will take more time than copy pasting the text. 

How do I copy paste the Sanskrit text? Which was taken from a pdf file? Because it uses a font other than unicode , so it not compatible.

As per son's advice I tried asking chatGPT - a fancier google. But without ugly and misleading promoted answer. Not yet. It initially told me. It should be in unicode.

Some how it sounded like a man. So sure of himself never even thinking that he may be wrong. When I told it, that it is wrong, it suggested, I check the font using online font search tools.

These tools - there are plenty. But none of them could tell me the correct font. Then I resorted to hindi OCR reader which easily converted image to proper Hindi text.

But this may not be the correct way. I tried getting more information on font recognition. One answer told that Adobe acrobat reader tells the font name in its properties tab.

I tried installing acrobat reader in my mac. But since it was not from app store - the software could not be installed. I dared not use command line tweaks to install the said software. 

Then finally I downloaded the same Sanskrit pdf file into Linux mint system and one of pdf reader software had font tab - which told the font was Chanakya. 

Then the work was easy. I converted Chanakya to unicode - copied, pasted. Added title attribute to each and every word with meanings. 

And luckily I could get meanings for each and every word in learnsanskrit.cc website. Which was better - because for my previous translations like Upanishad etc, I could not get word translation, nor the verse translation correctly.  If I could not find, a word it turned out, that word was wrongly converted.  

So here is the final output. The Panchatantra story with individual word translation and final translation at the end. 

And don't you forget read some Subhashita with their meanings and hovered meanings. 

P.S.: 

As it turned out, adding title attribute to the html, helps only in laptops. In mobile screens, where I think most of us read stuff, the tooltip, the hover nothing worked. I had to use a longer way of displaying meanings - using hidden property and a little bit of javascript for onclick event.

Comments

Popular posts from this blog

ಧರ್ಮದ ಉದಯ

 ಇಷ್ಟು ವರ್ಷಗಳ ನಂತರ ನನಗೆ ಒಂದು ವಿಷಯ ಸ್ಪಷ್ಟವಾಗುತ್ತಾ ಇದೆ. ಧರ್ಮ-ದೇವರುಗಳ ಮೂಲ ಸಂಸ್ಥಾಪಕಿ ನಮ್ಮ-ನಿಮ್ಮ ಹಾಗೆ ವಯಸ್ಸಾದ ಮಹಿಳೆ. ಜೀಸಸ್ ಅಲ್ಲ, ಬುದ್ಧ ಅಲ್ಲ, ಮಹಮದ್ ಅಲ್ಲ, ಬಸವಣ್ಣನಲ್ಲ.  ನೀವು ಖಂಡಿತ ಒಪ್ಪಿಕೊಳ್ಳವದಿಲ್ಲ ತಾನೇ? ಸ್ವಲ್ಪ ವಿಶ್ಲೇಷಿಸಿ ನೋಡೋಣ. ಶಾಂತಮ್ಮ - ಹಾಗೆಂದು ಹೆಸರಿಡೋಣ ನಮ್ಮ ಸಂಸ್ಥಾಪಕಿಗೆ. ಅವಳಿಗೆ ಚಾಲೀಸು, ಪಚಾಸು ಎಲ್ಲ ಯಾವಾಗಲೋ ದಾಟಿದೆ. ಮಕ್ಕಳು-ಮೊಮ್ಮಕ್ಕಳೆಲ್ಲ ದೊಡ್ಡವರಾಗಿ ಅವರವರ ಗೂಡು ಸೇರಿದ್ದಾರೆ. ಮನೆಯಲ್ಲಿರವವರು ಅವಳು, ಗಂಡ. ಎಲ್ಲೋ ಒಂದಿಷ್ಟು ಜಿರಲೆ, ಹಲ್ಲಿ, ಇರುವೆಗಳು ಕಂಪನಿ ಕೊಡುತ್ತಿವೆ. ದಿನದಲ್ಲಿ ೩-೪ ಗಂಟೆ ಅಡಿಗೆ-ಕಸ-ಮುಸುರೆ ಮಾಡಿದ ನಂತರ ಅವಳ ಕೈ, ಮನಸ್ಸು ಎಲ್ಲಾ ಖಾಲಿ. ಟಿ.ವೀ., ಮೊಬೈಲ್ ನೋಡುತ್ತ, ಬೇಜಾರಾದರೆ ಗೋಡೆ ನೋಡುತ್ತ ಕುಳಿತು ಅಲ್ಲೇ ನಿದ್ದೆ ಬಂದಿದೆ. ಅರೆ ನಿದ್ರೆ, ಅರೆ ಕನಸಿನಲ್ಲಿ ಏನೋ ನೋಡುತ್ತಾಳೆ - ಅದು ನಿಜವಾದ ಕನಸಾ, ಅಥವಾ ನೋಡಿರುವ ಸಾವಿರಾರು ಸೀರಿಯಲ್ಲುಗಳ ಕಲಸುಮೇಲೋಗರವಾ ಗೊತ್ತಿಲ್ಲ. ಒಂದು ವ್ಯಕ್ತಿ ಕಾಣುತ್ತಾನೆ - ಅವನ ತಲೆಯ ಸುತ್ತ ಬೆಳಕು (ಅಷ್ಟು ಹೊತ್ತಿಗೆ ಒಂದರೆಕ್ಷಣ ದೊಡ್ಡ ಬಿಸಿಲು ಬಂತಾ ?). ಅವನು ಏನೋ ಹೇಳುತ್ತಿದ್ದಾನೆ. ಅವಳಿಗೆ ಸರಿಯಾಗಿ ಕೇಳಿಸುತ್ತಿಲ್ಲ. ಕೊನೆಯಲ್ಲಿ ಅಭಯ ಹಸ್ತ ತೋರಿಸಿ ಮಾಯವಾಗುತ್ತಾನೆ. ಪೊಲಿಟಿಶಿಯನ್ನಾ? ಎದ್ದ ಶಾಂತಮ್ಮ ಕನಸು ನೆನಪಿಸಿಕೊಳ್ಳಲು ನೋಡುತ್ತಾಳೆ - ಎಲ್ಲಾ ಅರೆಸ್ಪಷ್ಟ. ಏನಿರಬಹುದು - ಯಾ...

Dharmabheeru

 I wanted to call this post 'fear'. Then something told me I might have at least one more post with that title. And of course there it was.  So the title had to be changed to Dharmabheeru (dharma - religion, bheeru - fearful, timid) - god fearing - pious. You are afraid. But that is not a bad thing because you are afraid of God - that he may punish you if you commit a sin.   But I have a feeling that fear makes us religious, makes us believe in God, because we want to be protected by someone - and mom can't protect the adult us.   Drowning myself in Sanskrit works - particularly Ashtavakragita ,  I had to find some meaning of these words like atma, mukti, jnana. And I asked AI to find me some texts to understand history of religions. It gave me many options - most of which are not available. But the one I stuck to was "The natural history of religions".  Reading that text was not very easy - but 3 part series of podcasts by 'Philosophize this' ab...

A festival day

 If you read works of 19th century writers like Saki or Wodehouse, you will find the rich old aristocratic ladies who are bored with their lives and waiting for some event, any event in their life.  I am certainly living in 19th century. This century, particularly this decade has been really eventful, most of them not so good. But still as an older lady, who spends most of her life within walls of her home, I can say my life is almost non-eventful.  Yesterday was different. I decided that I will celebrate the festival in good, traditional manner. Which is hypocritical to say the least. I am not so much traditional, not very much religious either.  But bored, yes of course. So I practiced one particular rangoli for the festival. I tried to learn one or two songs for Ganesha - today's deity, not so successful. And I decided I will make the same 5 sweets for Ganesha puja.  This morning did not start well. The kitchen sink malfunctioned and decided it needed more at...