forked from openjdk/jfx
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Dong Liu edited this page Oct 11, 2023
·
2 revisions
修改test Task:
// include("**/*.*");
exclude("**/*.*");
./gradlew build
构建结果目录:build/sdk/lib
./gradlew -PCOMPILE_WEBKIT=true build
./gradlew -PMAVEN_PUBLISH=true -PMILESTONE_FCS=true publishToMavenLocal -x test
版本xxx-internal(如22-internal)
./gradlew clean;./gradlew cleanNative
先要clean/cleanNative
./gradlew -PSTATIC_BUILD=true build
build后目录: build/sdk/lib
- copy 所有的.a文件到 .gluon/substrate/javafxStaticSdk/${version}/darwin-${arch}/sdk/lib
- 从原来的jar包中解压native compile config:unzip javafx.xxxx.jar META-INF/substrate
- copy需要的jar到.gluon/substrate/javafxStaticSdk/${version}/darwin-${arch}/sdk/lib
- 新jar包中加入native compile config:zip -ur avafx.xxxx.jar META-INF/substrate
调用路径:GlassView3D.m -> notifyInputMethod (GlassViewDelegate.m) -> notifyInputMethodMac(MacView) ->
- com.sun.javafx.font.PrismFontFactory#createFontResources,index默认是0,需要查找一下index
- com.sun.javafx.font.PrismFontFactory#getFontResource,常规字体应选择 Regular
0 = "PingFang SC Regular"
1 = "PingFang SC Medium"
2 = "PingFang SC Ultralight"
3 = "PingFang SC Semibold"
4 = "PingFang SC Thin"
5 = "PingFang SC Light"
PingFang 最早作为iOS 9和OS X El Capitan (10.11)的默认中文字体。
keyDown错误的设置shouldProcessKeyEvent=true
GlassViewDelegate.m#keyDown ->
GlassView3D.m#performKeyEquivalent->
com.sun.glass.ui.View#notifyKey ->
com.sun.javafx.tk.quantum.GlassViewEventHandler#handleKeyEvent ->
KeyEvent type=KEY_TYPED ->
com.sun.javafx.scene.control.behavior.TextInputControlBehavior#defaultKeyTyped
获取字符渲染结果:com.sun.javafx.font.coretext.CTGlyph#getPixelData(int),CTGlyph包含一个glyphCode和对应的字体。glyphCode是字体中对字符的编码,unicode到 glyphCode的转换:com.sun.javafx.font.CompositeGlyphMapper#convertToGlyph
CoreText的字体定义:CTFont
CompositeFontResource -> PrismCompositeFontResource (含 FallbackResource)
系统fallback字体:com.sun.javafx.font.coretext.CTFactory#getFallbacks