04-06-2023, 09:32 AM
How does one get the character styles defined in the current document? I want to apply an existing text style, chosen by the user, to new text art.
In the code below, it crashes on the first line with the error "Thread 1: EXC_BAD_ACCESS (code=1, address=0x8)"
I'm guessing here that the showAllStyles method populates the TextCharStyleSet with all current character styles whether used or not.
Any help would be much appreciated.
In the code below, it crashes on the first line with the error "Thread 1: EXC_BAD_ACCESS (code=1, address=0x8)"
I'm guessing here that the showAllStyles method populates the TextCharStyleSet with all current character styles whether used or not.
Code:
#include "hdicoreTextCharStyle.h"
#include "hdicoreTextCharStyleSet.h"
#include "hdicoreTextCharInspector.h"
#include "hdicoreTextCharFeatures.h"
#include "hdicoreTypes.h"
hdi::core::TextCharStyleSet css; // <--- crashes here
css.showAllStyles();
Any help would be much appreciated.