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

A problem with the fonts of the font name used in the text layers [Scripts]

Enthusiast ,
Jul 15, 2023 Jul 15, 2023

Greetings to all
I know I ask a lot
But I did not do this except after researching a lot about the problem I am facing, and I want to make it clear that all discussions and questions are personal and not commercial.

The problem I am facing is that there are files with text layers that I want to save the name of the fonts for these layers

I found code that does this, but the result is not identical to what is in the text layer properties display

To clarify more
in these pictures

Sample 1.jpg

When I try the code that I found

 

app.bringToFront(); // just in case
if (app.activeDocument.activeLayer.kind != LayerKind.TEXT)
    alert("Active layer is not a text layer. \nMake the desired text layer active before invoking the \"Show Font Name\" script.");
else
{
        var Font = prompt("Enter a new width in pixels.", app.activeDocument.activeLayer.textItem.font); 
}

 

 it gives a different result in terms of names

Sample 2.jpgBut I found a huge code, but I don't understand how it works and how to analyze the code data

 

This is the code that does what is required, but I just want to copy the font name into a txt file

 

// fontFinder.jsx - Adobe Photoshop Script
// Version: 0.3.2
// Requirements: Adobe Photoshop CS6 or higher
// Author: Anton Lyubushkin (nvkz.nemo@gmail.com)
// Website: http://uberplugins.cc/
// ============================================================================
// Installation:
// 1. Place script in:
//    PC:  C:\<Program Files>\Adobe\Adobe Photoshop <version>\Presets\Scripts\
//    Mac: <hard drive>/Applications/Adobe Photoshop <version>/Presets/Scripts/
// 2. Restart Photoshop
// 3. Choose File > Scripts > fontFinder
// ============================================================================

/*
<javascriptresource>
<name>Find And Select Layers By Font...</name>
<category>UberPlugins</category>
<about>$$$/JavaScripts/fontFinder/About=fontFinder.jsx v.0.3.2^r^r© Anton Lyubushkin 2016^r^rwww.uberplugins.cc</about>
<enableinfo>true</enableinfo>
</javascriptresource>
*/

#target photoshop

eval("@JSXBIN@ES@2.0@MyBbyBn0ABgAbyBnAFMPbyBn0AJJRnASzBjJBBndAftJVnASzHiViJifjSjFjThRCDnelfjEjJjBjMjPjHjbhAjUjFjYjUhahAhHiGjPjO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jPjOjUiTfjiNfnfOEbFn0ADJFnAEjhJfnfJGnASIyBEjiQfnfnffOIbyJn0ABJJnAEjgdfRBXzBhRiUfVIfyBffACYXzBhQiVfVIfyBnndAbyLn0ABJLnAEjZfnfACYXFfXzJjEjPjDjVjNjFjOjUjTiWfjiNfnndAnABniGnbyBn0ABJkTnAEjzFjBjMjFjSjUiXfRBCDCDXzEjMjJjOjFiYfjiGfnneBKjiGfnnffABI40BiAABAHByB");

 

Final.jpg

I attached the line in the attachments so that the code can be tested correctly
I also attached the open design

 

 

---**--- What is required is only the name of the font in order to be saved in the txt file, but I want the correct way to fetch the name of the font as I explained

 

TOPICS
Actions and scripting , SDK
840
Translate
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 2 Correct answers

People's Champ , Jul 15, 2023 Jul 15, 2023

See the uncoded version.

 

try {
    app.bringToFront();
    if (app.documents.length > 0) {
        selectAllLayers();
        textLayers = getSelectedTextLayersIndexs();
        if (textLayers[0] > 0) {
            showMyDialog(textLayers[1]);
        } else {
            deselectLayers();
        }
    }

    function showMyDialog(textLayers) {
        var i = 0;
        UI_res1 = "dialog{ text: 'Font Finder', preferredSize:[-1, -1], orientation: 'column', alignChildren:'left',\n            fon
...
Translate
People's Champ , Jul 16, 2023 Jul 16, 2023

This code does not work with one layer in CS6. To get information for the active layer, you can take parts of this code and use it in your script.

 

 

 

var ref2 = new ActionReference();
ref2.putEnumerated(charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt"));
var desc2 = executeActionGet(ref2);

if (desc2.hasKey(stringIDToTypeID("textKey"))) 
    {
    var textStyle = desc2.getObjectValue(charIDToTypeID("Txt ")).getList(charIDToTypeID("Txtt")).getObjectValue(0).getObjectValue(char
...
Translate
Adobe
People's Champ ,
Jul 15, 2023 Jul 15, 2023

See the uncoded version.

 

try {
    app.bringToFront();
    if (app.documents.length > 0) {
        selectAllLayers();
        textLayers = getSelectedTextLayersIndexs();
        if (textLayers[0] > 0) {
            showMyDialog(textLayers[1]);
        } else {
            deselectLayers();
        }
    }

    function showMyDialog(textLayers) {
        var i = 0;
        UI_res1 = "dialog{ text: 'Font Finder', preferredSize:[-1, -1], orientation: 'column', alignChildren:'left',\n            fonts: Group {text: 'Horizontal →', orientation: 'column', alignChildren:'left', ";
        for (var key in textLayers) {
            UI_res1 += "option" + i + ": Checkbox {text:'" + key + " / " + textLayers[key].indexes.length + " layers', value: false}, ";
            i++;
        }
        UI_res2 = "} buttons: Group {orientation: 'row', cancel_btn: Button {text: 'Cancel'}, submit_btn: Button {text: 'Select Layers'}, } }";
        UI_res = UI_res1 + UI_res2;
        w = new Window(UI_res);
        w.buttons.submit_btn.onClick = function() {
            var checkedGroups = [];
            var g = 0;
            for (var key in textLayers) {
                var tmpName = "option" + g;
                if (w.fonts[tmpName].value == true) {
                    checkedGroups = checkedGroups.concat(textLayers[key].indexes);
                }
                g++;
            }
            if (checkedGroups.length > 0) {
                selectLayersByIndex(checkedGroups);
            } else {
                deselectLayers();
            }
            w.close();
        };
        w.buttons.cancel_btn.onClick = function() {
            w.close();
        };
        w.show();
    }

    function selectAllLayers() {
        var desc1 = new ActionDescriptor();
        var ref1 = new ActionReference();
        ref1.putEnumerated(charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt"));
        desc1.putReference(charIDToTypeID("null"), ref1);
        executeAction(stringIDToTypeID("selectAllLayers"), desc1, DialogModes.NO);
    }

    function deselectLayers() {
        var desc1 = new ActionDescriptor();
        var ref1 = new ActionReference();
        ref1.putEnumerated(charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt"));
        desc1.putReference(charIDToTypeID("null"), ref1);
        executeAction(stringIDToTypeID("selectNoLayers"), desc1, DialogModes.NO);
    }

    function getSelectedTextLayersIndexs() {
        var lyrs = {};
        var count = 0;
        var ref = new ActionReference();
        ref.putEnumerated(charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt"));
        if (executeActionGet(ref).hasKey(stringIDToTypeID("targetLayers"))) {
            var targetLayers = executeActionGet(ref).getList(stringIDToTypeID("targetLayers"));
            for (var i = 0; i < targetLayers.count; i += 1) {
                var ref2 = new ActionReference();
                try {
                    activeDocument.backgroundLayer;
                    ref2.putIndex(charIDToTypeID("Lyr "), targetLayers.getReference(i).getIndex());
                    var desc2 = executeActionGet(ref2);
                    var layerIndex = desc2.getInteger(stringIDToTypeID("itemIndex")) - 1;
                } catch (o) {
                    ref2.putIndex(charIDToTypeID("Lyr "), targetLayers.getReference(i).getIndex() + 1);
                    var desc2 = executeActionGet(ref2);
                    var layerIndex = desc2.getInteger(stringIDToTypeID("itemIndex"));
                }
                if (desc2.hasKey(stringIDToTypeID("textKey"))) {
                    var fontGroupName = "";
                    var fontGroupDetail = "";
                    var textStyle = desc2.getObjectValue(charIDToTypeID("Txt ")).getList(charIDToTypeID("Txtt")).getObjectValue(0).getObjectValue(charIDToTypeID("TxtS"));
                    var fontName = textStyle.getString(charIDToTypeID("FntN"));
                    var fontStyleName = textStyle.getString(charIDToTypeID("FntS"));
                    fontGroupName = "" + fontName + "-" + fontStyleName;
                    try {
                        var fontAvailable = textStyle.getBoolean(stringIDToTypeID("fontAvailable"));
                        if (!fontAvailable) {
                            fontGroupName = fontGroupName + " (Missing font)"
                        }
                    } catch (e) {

                    }
                    if (!lyrs[fontGroupName]) {
                        lyrs[fontGroupName] = {};
                        lyrs[fontGroupName].indexes = [];
                    }
                    count++;
                    lyrs[fontGroupName].indexes.push(layerIndex);
                }
            }
        } else {
            var ref2 = new ActionReference();
            ref2.putProperty(charIDToTypeID("Prpr"), charIDToTypeID("ItmI"));
            ref2.putEnumerated(charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt"));
            if (app.activeDocument.activeLayer.kind == LayerKind.TEXT) {
                try {
                    activeDocument.backgroundLayer;
                    lyrs.push(executeActionGet(ref2).getInteger(charIDToTypeID("ItmI")) - 1);
                } catch (o) {
                    lyrs.push(executeActionGet(ref2).getInteger(charIDToTypeID("ItmI")));
                }
                count++;
            }
        }
        return [count, lyrs];
    }

    function selectLayersByIndex(_arrayOfIndexes) {
        var desc1 = new ActionDescriptor();
        var ref1 = new ActionReference();
        for (var i in _arrayOfIndexes) {
            ref1.putIndex(charIDToTypeID("Lyr "), _arrayOfIndexes[i]);
        }
        desc1.putReference(charIDToTypeID("null"), ref1);
        desc1.putBoolean(charIDToTypeID("MkVs"), false);
        executeAction(charIDToTypeID("slct"), desc1, DialogModes.NO);
    }
} catch (e) {
    alert(e.line + "\n" + e);
}

 

 

P.S. If the font is not installed in the system, this script will not help either.

 

Translate
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
Enthusiast ,
Jul 15, 2023 Jul 15, 2023

@r-bin 

Great job and very much appreciated
Thank you, really

Translate
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
Enthusiast ,
Jul 15, 2023 Jul 15, 2023

@r-bin 

Excuse me sir
This code is a prerequisite that it works on more than one layer

But if in the case that the document contains one text layer, it does not work

What is the solution

Translate
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 ,
Jul 16, 2023 Jul 16, 2023
LATEST

This code does not work with one layer in CS6. To get information for the active layer, you can take parts of this code and use it in your script.

 

 

 

var ref2 = new ActionReference();
ref2.putEnumerated(charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt"));
var desc2 = executeActionGet(ref2);

if (desc2.hasKey(stringIDToTypeID("textKey"))) 
    {
    var textStyle = desc2.getObjectValue(charIDToTypeID("Txt ")).getList(charIDToTypeID("Txtt")).getObjectValue(0).getObjectValue(charIDToTypeID("TxtS"));
    var fontName = textStyle.getString(charIDToTypeID("FntN"));
    var fontStyleName = textStyle.getString(charIDToTypeID("FntS"));

    alert(fontName + " " + fontStyleName);
    }

 

 

 

UPD.

For the code to work, you need to have more than one layer in the document. Add just an empty layer.
 
Translate
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