I just tried, and it works!
Here is what I did:
1-I put an otf font file in a folder.
Copied
NotoSansAhom-Regular.otf to
/storage/emulated/0/Download/FONTS/2-Adapted the test from the link you have to:
procedure Test_OTF(const APath:String);
var
CacheList : TFPFontCacheList;
CacheItem : TFPFontCacheItem;
i: integer;
begin
try
CacheList := TFPFontCacheList.Create;
CacheList.SearchPath.Add(APath);
CacheList.BuildFontCache;
Log('CacheList.Count: '+CacheList.Count.ToString);
for i := 0 to CacheList.Count-1 do
Log(CacheList.Items[i].PostScriptName);
CacheItem := CacheList.Find('NotoSansAhom-Regular');
if CacheItem<>nil then
Log('CapHeight: '+IntToStr(CacheItem.FontData.CapHeight))
else
Log('CacheItem is NIL');
except
Log('An error occurred...');
CacheList.Free;
end;
end;
of course, don't forget to add unit fpTTF to the uses section.
Log is a simple function to add the text to a jEditText
Call Test_OTF with the correct path. Notice the path is case-sensitive.
3-Gave the app storage permission.