• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How get impliedFontSize?

New Here ,
Nov 08, 2018 Nov 08, 2018

Copy link to clipboard

Copied

Hello everyone, I am again)

I am writing .PDS parser file, and I ran into a problem. It does not always parse the correct font sizes.

For example, it returns me the size 18px, but in Photoshop it has a size of 65px.

I also have another parser, the .jsx format that I found on the Internet.

In the parser format .jsx on texts appears some variable "impliedFontSize" Which shows the actual font size.

I cannot find this variable in the documentation.

Adobe Photoshop File Formats Specification

Here .jsx parser: http://dt-byte.ru/fc2bcb41-JavaScriptFile.jsx

I did not understand where he is pulling out this variable "impliedFontSize"

Please help me find the actual font size in Photoshop

TOPICS
Actions and scripting

Views

475

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

People's Champ , Nov 09, 2018 Nov 09, 2018

Интересненько. Но документация явно устарела. Данные предлагаются максимум для 6.0 (a CS6 = 13.0).

Не стал разбираться с вашим парсером. Дело гиблое для меня ).

Короче, решил поковырять.

В CS6 создал файл 1920х1080х72. Написал Ариалом 72pt текс "123";

Сохранил.

Изменил разрешение файла на 600 без ресамплинга.

Шрифт стал показывать размер 8.64pt.

Сохранил как второй файл.

Написал маленький скрипт, который вытащил все блоки "8BIM" (53шт) из файлов

и сохранил их отдельными файлами в разные подпапки.

Что пока

...

Votes

Translate

Translate
Adobe
People's Champ ,
Nov 08, 2018 Nov 08, 2018

Copy link to clipboard

Copied

And can I ask you how your parser finds font sizes for texts based on this documentation?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 09, 2018 Nov 09, 2018

Copy link to clipboard

Copied

Honestly, I also found this parser on the Internet))

The parser got the basic properties, and I extend them so that there are more properties.

I’m pulling all the text information out of here: https://dt-byte.ru/fae9aa98.png

Here are all the results that managed to pull out: https://dt-byte.ru/fc9b9385.txt

Maybe I need to look elsewhere.

Here is the parser itself with layout http://dt-byte.ru/fc9d3543-psdTo.zip

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Nov 09, 2018 Nov 09, 2018

Copy link to clipboard

Copied

Интересненько. Но документация явно устарела. Данные предлагаются максимум для 6.0 (a CS6 = 13.0).

Не стал разбираться с вашим парсером. Дело гиблое для меня ).

Короче, решил поковырять.

В CS6 создал файл 1920х1080х72. Написал Ариалом 72pt текс "123";

Сохранил.

Изменил разрешение файла на 600 без ресамплинга.

Шрифт стал показывать размер 8.64pt.

Сохранил как второй файл.

Написал маленький скрипт, который вытащил все блоки "8BIM" (53шт) из файлов

и сохранил их отдельными файлами в разные подпапки.

Что показала экспертиза ).

Различия обнаружились всего в шести блоках

в XMP блоке (0x0424)

в небольшом блоке "Настройки печати" (0x043B)

в маленьком блоке ResulutionInfo (0x03ED)

в блоке EXIF (0x0422)

и в двух маленьких блоках "8BIMcust" (для каждого слоя, метадата для слоя - layerTime)

В блоке "8BIMTySh" никаких отличий не обнаружено.

В текстовом виде FontSize и там и там показывал 72.

Более того, если ручками поменять 72 на другое значение хекс-редактором,

то никакого эффекта это не производит. При открытии файла шрифт остается того же размера

и при пересохранении значение восстанавливается. Значит, размер шрифта сидит точно не там.

Отсюда вывод. Те значения, которые показывает фотошоп для шрифта, в том числе и отсутствующее в CS6 "impliedFontSize" скорее всего синтетические, полученные вычислениями из других величин, таких как разрешение и, например, параметры трансформации текста.

По поводу impliedFontSize и её аналогов можете посмотреть тему.

Re: textItem.size incorrect after image resized

Там я коё-чего нарыл )

ЗЫ. Надеюсь, understand )

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 09, 2018 Nov 09, 2018

Copy link to clipboard

Copied

LATEST

Огромное спасибо!

Что то я сам сразу так и не понял, что можно же текстовые слои увеличивать путем трансформации. Проверил слой и увидел что у него размеры 3.9104, если умножить 16.62216 * 3.9104 = 64.99 те самые заветные мои 65px))

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines