1

I want to paste Telugu/Tamil text from a PDF file to a VS Code file with a .js extension, but it just shows blocks.

Other fonts, like Hindi or Arabic are working fine: when I paste them, it is showing the actual text.

I just want to load the Telugu/Tamil font, I do not want to type that font.

enter image description here

Telugu/Tamil font in the PDF file:

enter image description here

Telugu/Tamil file in VS Code:

enter image description here

TextEdit app:

enter image description here

Unicode Image enter image description here

3
  • 2
    What happens in TextEdit or other Apple applications?
    – mmmmmm
    Commented Oct 10, 2022 at 7:12
  • @mmmmmm same happening, update the question added the screenshot
    – Ashad
    Commented Oct 10, 2022 at 7:30
  • 1
    There shoud be no problem in TextEdit if your characters are Unicode, since MacOS always has fonts already installed to display Telugu and Tamil. Is it possible your PDF is using legacy non-unicode fonts? Such fonts will most likely not work, even if you download and install them. Commented Oct 10, 2022 at 12:25

1 Answer 1

3

So, PDF's carry with them the ability to embed a font file in the PDF itself. The glyphs you're attempting to render within the programs you have listed clearly are not present/selected for in those applications (VSC as a for-instance, allows one to set the font they wish to code in).

If the font you have selected omits these characters, you get the blocks (which are referred to as "tofu" internally at Apple). Apple has done their best at a SystemUI level to prevent this from happening (if you've ever wondered what all those noto - e.g. Noto Sans - fonts that come pre-installed, they're glyph libraries. noto == NoTo == No Tofu).

Pick a font you KNOW contains the glyphs that are tofu'd out, use it in your editor panel in VSC, then report back.

EDIT 1: You can get instructions for how to download the fonts using the inbuilt fontbook app here

EDIT 2: Also, I have a secondary solution for you. Open your character viewer (On a keyboard with a 🌐, you can press that key to bring up the viewer, OR Press Command-Control-Space.)

Character Viewer

Scroll down until you see Unicode. Select it. In the following panel, scroll until you see Tamil. Select IT. Finally, click a glyph. You'll see different stylings of said glyph in the rightmost panel. Clicking any will tell you the name of the font that supports it.

6
  • From where Can I download those Fonts
    – Ashad
    Commented Oct 10, 2022 at 7:33
  • 2
    Well, let's start from the other direction: do you happen to know the font your PDF is rendering in? Or can you post said PDF, and I can dig out the name for you? I'm not sure where to get the specific Noto font you need, and to download them ALL is... sizable. If you can figure out how to post the PDF somewhere, I'll try to dig out a DL source for the font used, or, failing that, try and track down the appropriate Noto for you. I'm pretty sure Apple offers em in their developer downloads. Lemme go check
    – NerdyDeeds
    Commented Oct 10, 2022 at 7:35
  • 2
    Much obliged, Jaume!
    – NerdyDeeds
    Commented Oct 10, 2022 at 7:37
  • update the question with the image, there is no, Unicode option in mine
    – Ashad
    Commented Oct 10, 2022 at 8:23
  • 2
    @AshadNasim You have to go to the top left corner and click and do Custtomize to add Unicode to the list in Character Viewr Commented Oct 10, 2022 at 12:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .