mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-18 05:01:53 +00:00
#668: text tags fixed
This commit is contained in:
@@ -758,8 +758,7 @@ public final class MethodInfoLexer {
|
||||
*
|
||||
* @return the next token
|
||||
* @exception java.io.IOException if any I/O-Error occurs
|
||||
* @throws
|
||||
* com.jpexs.decompiler.flash.abc.methodinfo_parser.MethodInfoParseException
|
||||
* @throws MethodInfoParseException
|
||||
*/
|
||||
public ParsedSymbol yylex() throws java.io.IOException, MethodInfoParseException {
|
||||
int zzInput;
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags.base;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
@@ -166,29 +167,33 @@ public abstract class FontTag extends CharacterTag implements AloneTag, Drawable
|
||||
}
|
||||
|
||||
public void shiftGlyphIndices(int fontId, int startIndex) {
|
||||
public void shiftGlyphIndices(int fontId, int startIndex) {
|
||||
for (Tag t : swf.tags) {
|
||||
List<TEXTRECORD> textRecords = null;
|
||||
if (t instanceof DefineTextTag) {
|
||||
if (t instanceof DefineTextTag) {
|
||||
textRecords = ((DefineTextTag) t).textRecords;
|
||||
} else if (t instanceof DefineText2Tag) {
|
||||
textRecords = ((DefineText2Tag) t).textRecords;
|
||||
}
|
||||
}
|
||||
if (t instanceof DefineText2Tag) {
|
||||
textRecords.addAll(((DefineText2Tag) t).textRecords);
|
||||
}
|
||||
}
|
||||
int curFontId = 0;
|
||||
for (TEXTRECORD tr : textRecords) {
|
||||
if (tr.styleFlagsHasFont) {
|
||||
curFontId = tr.fontId;
|
||||
}
|
||||
if (curFontId != fontId) {
|
||||
continue;
|
||||
}
|
||||
for (GLYPHENTRY en : tr.glyphEntries) {
|
||||
if (en == null) { //Currently edited
|
||||
continue;
|
||||
}
|
||||
if (en.glyphIndex >= startIndex) {
|
||||
|
||||
if (textRecords != null) {
|
||||
int curFontId = 0;
|
||||
for (TEXTRECORD tr : textRecords) {
|
||||
if (tr.styleFlagsHasFont) {
|
||||
curFontId = tr.fontId;
|
||||
}
|
||||
if (curFontId != fontId) {
|
||||
continue;
|
||||
}
|
||||
for (GLYPHENTRY en : tr.glyphEntries) {
|
||||
if (en == null) { //Currently edited
|
||||
continue;
|
||||
}
|
||||
if (en.glyphIndex >= startIndex) {
|
||||
en.glyphIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
t.setModified(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user