Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 01:45
    josegomez opened #3489
  • Jan 28 22:29
    MarchingCube edited #3488
  • Jan 28 22:27
    MarchingCube opened #3488
  • Jan 28 21:53
    MarchingCube edited #3487
  • Jan 28 21:52
    MarchingCube edited #3487
  • Jan 28 21:48
    kekekeks assigned #3487
  • Jan 28 21:48
    kekekeks labeled #3487
  • Jan 28 21:45
    MarchingCube edited #3487
  • Jan 28 21:44
    MarchingCube edited #3487
  • Jan 28 21:43
    grokys synchronize #3470
  • Jan 28 21:43

    grokys on selectionmodel-changed-notifications

    WIP (compare)

  • Jan 28 21:41
    MarchingCube edited #3487
  • Jan 28 21:41
    MarchingCube opened #3487
  • Jan 28 21:38
    MarchingCube opened #3486
  • Jan 28 20:39

    grokys on ilogicalroot

    (compare)

  • Jan 28 20:39

    grokys on master

    Rename IStyleRoot -> ILogicalRo… Merge branch 'master' into refa… Merge branch 'master' into refa… and 1 more (compare)

  • Jan 28 20:39
    grokys closed #3346
  • Jan 28 20:28
    MarchingCube commented #3352
  • Jan 28 20:27
    MarchingCube synchronize #3352
  • Jan 28 18:04
    grokys edited #3346
Nikita Tsukanov
@kekekeks
something something weird fontconfig in manjaro
Benedikt Stebner
@Gillibald
Hmm. If Skia isn't able to construct the default you are kinda lost. There are multiple ways to solve this. Use a custom font. Implement your own font manager. Probably adding one for these scenarios soon. Or try to investigate what is failing with FontConfig.
Nikita Tsukanov
@kekekeks
I guess we could provide an environment variable for default font name
and throw a meaningful exception from FontManager instead of NRE
Benedikt Stebner
@Gillibald
The thing is if you don't have a working font manager you can't load any font. I doubt we want to ship one. It is possible to just setup your app with a custom font manager. Trivial to implement.
Nikita Tsukanov
@kekekeks
I guess the recent fontconfig no longer supports null as FcPatternAddString argument
Benedikt Stebner
@Gillibald
But y we should throw an meaningful exception
Nikita Tsukanov
@kekekeks
Or there is something weird with configuration
Benedikt Stebner
@Gillibald
Will remove this https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Visuals/Platform/IPlatformRenderInterface.cs#L119 and instead rely solely on a registered instance via AvaloniaLocator. That way you can setup your app with a custom manager on demand. For environments that don't provide a native font manager.
Nikita Tsukanov
@kekekeks
+
RedlineTriad
@RedlineTriad
Ok, am back.
Also, the name isn't null, the check is string.IsNullOrEmpty(name) and it is empty but throws an ArgumentNullException
Jumar Macato
@jmacato
@kekekeks I have a manjaro ARM
though i can fire up a manjaro vm in a jiffy if thats needed
Nikita Tsukanov
@kekekeks
for some reason SKTypeface.Default.FamilyName doesn't have a proper value
please, check on your manjaro machine
RedlineTriad
@RedlineTriad
redline@redline-pc /r/m/r/D/r/Avalonia-Hello-World> for family in serif sans-serif monospace Arial Helvetica Verdana "Times New Roman" "Courier New";
                                                          echo -n "$family: "
                                                          fc-match "$family"
                                                    end
serif: NotoSerif-Regular.ttf: "Noto Serif" "Regular"
sans-serif: NotoSans-Regular.ttf: "Noto Sans" "Regular"
monospace: NotoSansMono-Regular.ttf: "Noto Sans Mono" "Regular"
Arial: LiberationSans-Regular.ttf: "Liberation Sans" "Regular"
Helvetica: LiberationSans-Regular.ttf: "Liberation Sans" "Regular"
Verdana: NotoSans-Regular.ttf: "Noto Sans" "Regular"
Times New Roman: LiberationSerif-Regular.ttf: "Liberation Serif" "Regular"
Courier New: LiberationMono-Regular.ttf: "Liberation Mono" "Regular"
Nikita Tsukanov
@kekekeks
@Gillibald could we use serif as a fallback?
or sans-serif if that fails?
at least on Linux
@RedlineTriad please, try fc-match ""
RedlineTriad
@RedlineTriad
redline@redline-pc /r/m/r/D/r/Avalonia-Hello-World> for family in serif sans-serif monospace Arial Helvetica Verdana "Times New Roman" "Courier New";
                                                          echo -n "$family: "
                                                          fc-match ""
                                                    end
serif: NotoSans-Regular.ttf: "Noto Sans" "Regular"
sans-serif: NotoSans-Regular.ttf: "Noto Sans" "Regular"
monospace: NotoSans-Regular.ttf: "Noto Sans" "Regular"
Arial: NotoSans-Regular.ttf: "Noto Sans" "Regular"
Helvetica: NotoSans-Regular.ttf: "Noto Sans" "Regular"
Verdana: NotoSans-Regular.ttf: "Noto Sans" "Regular"
Times New Roman: NotoSans-Regular.ttf: "Noto Sans" "Regular"
Courier New: NotoSans-Regular.ttf: "Noto Sans" "Regular"
Nikita Tsukanov
@kekekeks
so fc-match "" doesn't return anything, right?
On my Ubuntu 18.04 machine it returns DejaVuSans.ttf: "DejaVu Sans" "Book"
RedlineTriad
@RedlineTriad
redline@redline-pc /r/m/r/D/r/Avalonia-Hello-World> fc-match ""
NotoSans-Regular.ttf: "Noto Sans" "Regular"
Nikita Tsukanov
@kekekeks
I wonder why it's broken then
@Gillibald any ideas?
Jumar Macato
@jmacato
checking SKTypeface.Default.FamilyName now
ah wait, fc-match first, and it returns a font for me on manjaro
when i try fc-match ""
Jumar Macato
@jmacato
@kekekeks SKTypeface.Default.FamilyName isnt null on Manjaro ARM
Nikita Tsukanov
@kekekeks

@RedlineTriad try adding

if(string.IsNullOrWhitespace(DefaultFontFamilyName) && RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
     DefaultFontFamilyName = "serif";

to
https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Visuals/Media/FontManager.cs#L27

RedlineTriad
@RedlineTriad
@kekekeks :
System.NullReferenceException: Object reference not set to an instance of an object.
   at Avalonia.Skia.FontManagerImpl.CreateGlyphTypeface(Typeface typeface) in /run/media/redline/Data/repos/Avalonia/src/Skia/Avalonia.Skia/FontManagerImpl.cs:line 99
   at Avalonia.Media.GlyphTypeface..ctor(Typeface typeface) in /run/media/redline/Data/repos/Avalonia/src/Avalonia.Visuals/Media/GlyphTypeface.cs:line 14
   at Avalonia.Media.Typeface.get_GlyphTypeface() in /run/media/redline/Data/repos/Avalonia/src/Avalonia.Visuals/Media/Typeface.cs:line 74
   at Avalonia.Skia.FormattedTextImpl..ctor(String text, Typeface typeface, Double fontSize, TextAlignment textAlignment, TextWrapping wrapping, Size constraint, IReadOnlyList`1 spans) in /run/media/redline/Data/repos/Avalonia/src/Skia/Avalonia.Skia/FormattedTextImpl.cs:line 32
   at Avalonia.Skia.PlatformRenderInterface.CreateFormattedText(String text, Typeface typeface, Double fontSize, TextAlignment textAlignment, TextWrapping wrapping, Size constraint, IReadOnlyList`1 spans) in /run/media/redline/Data/repos/Avalonia/src/Skia/Avalonia.Skia/PlatformRenderInterface.cs:line 59
   at Avalonia.Media.FormattedText.get_PlatformImpl() in /run/media/redline/Data/repos/Avalonia/src/Avalonia.Visuals/Media/FormattedText.cs:line 146
   at Avalonia.Media.FormattedText.get_Bounds() in /run/media/redline/Data/repos/Avalonia/src/Avalonia.Visuals/Media/FormattedText.cs:line 70
Nikita Tsukanov
@kekekeks
mkay, something seems to be really broken
It seems that skia doesn't recognize the actual font family name
we might need to manually P/Invoke libfontconfig and have a custom Linux specific font manager implementation
Benedikt Stebner
@Gillibald
I am fine with adding a custom implementation. We don't need to use Skia's font manager.
RedlineTriad
@RedlineTriad
"Font Manager" i mean i am not quite sure what it does but from the results it seems to just be a lot of functions returning null.
Benedikt Stebner
@Gillibald
It could be that freetype is the issue. A debug build would help investigate this further.
Fontconfig just does the lookup. The typeface is loaded by freetype
Nikita Tsukanov
@kekekeks
skia should be shipping with its own freetype though
a fairly recent one
Benedikt Stebner
@Gillibald
It is
I upgraded it recently
If we can repro it in a VM I can investigate this further
RedlineTriad
@RedlineTriad
It seems like another person could reproduce it on manjaro arm.
That is just about as far away from me as possible while in the same distro.
So just about any manjaro build or even arch should work.
Benedikt Stebner
@Gillibald
Having a look tomorrow