# UXP Photoshop API

**URL:** <https://forums.creativeclouddeveloper.com/t/uxp-photoshop-api/8572>\
**Category:** UXP Plugin API\
**Tags:** bug, feature-request, uxp\
**Created:** [October 24, 2024, 8:24am UTC](https://forums.creativeclouddeveloper.com/t/uxp-photoshop-api/8572 "2024-10-24T08:24:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![harsh-mono](https://avatars.discourse-cdn.com/v4/letter/h/e68b1a/32.png) [@harsh-mono](https://forums.creativeclouddeveloper.com/u/harsh-mono)\
**Post date:** [October 24, 2024, 8:24am UTC](https://forums.creativeclouddeveloper.com/t/uxp-photoshop-api/8572/1 "2024-10-24T08:24:53Z")

</div>

I am trying to access fonts used in the photoshop documents using UXP plugin. While reading the documentation i observed that inside a layer there is only 1 text item. So suppose if inside one layer what if multiple fonts are used. In that case i am not able to get all the fonts used. Is there any other way to get all the fonts used in photoshop ?

---

<div class="post-metadata">

**Author:** ![Jarda](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/jarda/32/1909_2.png) [@Jarda](https://forums.creativeclouddeveloper.com/u/Jarda)\
**Post date:** [October 24, 2024, 8:41am UTC](https://forums.creativeclouddeveloper.com/t/uxp-photoshop-api/8572/2 "2024-10-24T08:41:08Z")

</div>

With batchPlay you could get that info. Here I have Advanced font remapping 1.0 [https://www.mightyplugins.cc/magic-scripts](https://www.mightyplugins.cc/magic-scripts)

It reads all fonts in all selected layers and allows you to remap them. This uses Action Manager code in Extend Script… in UXP it looks differently. Harder to read and understand on how this would translate to UXP batchPlay.

---

<div class="post-metadata">

**Author:** ![harsh-mono](https://avatars.discourse-cdn.com/v4/letter/h/e68b1a/32.png) [@harsh-mono](https://forums.creativeclouddeveloper.com/u/harsh-mono)\
**Post date:** [October 25, 2024, 8:47am UTC](https://forums.creativeclouddeveloper.com/t/uxp-photoshop-api/8572/3 "2024-10-25T08:47:52Z")

</div>

Hi,

Thanks for the reply. I just got to know about batchPlay. I tried to find documentation around actions available but i was not able to get that. If you have any source through which i cam get that. Can you please share ?

---

<div class="post-metadata">

**Author:** ![Jarda](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/jarda/32/1909_2.png) [@Jarda](https://forums.creativeclouddeveloper.com/u/Jarda)\
**Post date:** [October 25, 2024, 9:04am UTC](https://forums.creativeclouddeveloper.com/t/uxp-photoshop-api/8572/4 "2024-10-25T09:04:02Z")

</div>

There is no documentation for action descriptors. The original idea is we are not supposed to work with low-level action descriptors but use DOM instead.

Problem with DOM is that it matches features of Photoshop CS3 from 2007 or something like that. But not all of them. Layer masks were introduced in 1994 in PS 3.0 and 30 years later there is no DOM API to create/remove layer masks. So you have to use action manager code (batchPlay). And there is currently no vision to add new features into DOM.

So you can only reverse-engineer internal action. Usually, those have often various quirks and is not always easy to understand them. I created Alchemist plugin. It can help you with it a bit.

---

<div class="post-metadata">

**Author:** ![Jarda](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/jarda/32/1909_2.png) [@Jarda](https://forums.creativeclouddeveloper.com/u/Jarda)\
**Post date:** [October 25, 2024, 9:08am UTC](https://forums.creativeclouddeveloper.com/t/uxp-photoshop-api/8572/5 "2024-10-25T09:08:18Z")

</div>

But back to your original question… for Text layers. It has DOM API and is quite good. But does not involve text ranges and paragraph ranges intentionally by design.
