be5invis / Iosevka

Versatile typeface for code, from code.
http://be5invis.github.io/Iosevka
SIL Open Font License 1.1
19.16k stars 569 forks source link

Crash building private style #416

Closed paolobolzoni closed 4 years ago

paolobolzoni commented 4 years ago

Iosevka version, git 5fe8a07ee33e128232e7f1efb3e0be71c159b3be

design = [ "no-ligation", "cv01", "cv13", "cv17", "cv19", "cv20", "cv23", "cv24", "cv26", "cv28", "cv30", "cv32", "cv35", "cv37", "cv38", "cv41", "cv43", "cv44", "cv46", "cv49", "cv51", "cv52", "cv56", "cv58", "cv63", "cv65", "cv66", "cv69", "cv72", "cv74", "cv76", "cv78", "cv81", "cv83", "cv87" ]

italic = [ "italic-only", "cv04", "cv08", "cv27", "cv33", "cv34", "cv40", "cv42", "cv53", "cv70" ]

hintParams = ["-a", "sss"]

[buildPlans.iosevka-wpaopao.weights.light] shape = 240 menu = 240 css = 240

[buildPlans.iosevka-wpaopao.weights.regular] shape = 480 menu = 480 css = 480

[buildPlans.iosevka-wpaopao.weights.bold] shape = 960 menu = 960 css = 960

[buildPlans.iosevka-wpaopao.slants] upright = "normal" italic = "italic"

* The detailed error log:

<--- Last few GCs --->

[2961:0x55eb87eee820] 687238 ms: Mark-sweep 2062.3 (2082.3) -> 2061.0 (2094.0) MB, 4273.0 / 0.0 ms (average mu = 0.504, current mu = 0.229) allocation failure scavenge might not succeed [2961:0x55eb87eee820] 697395 ms: Mark-sweep 2074.0 (2094.0) -> 2075.6 (2095.8) MB, 3710.9 / 0.0 ms (average mu = 0.580, current mu = 0.635) allocation failure scavenge might not succeed

<--- JS stacktrace ---> Cannot get stack trace in GC. FATAL ERROR: MarkCompactCollector: semi-space copy, fallback in old gen Allocation failed - JavaScript heap out of memory

1: 0x55eb85d51101 node::Abort() [/usr/bin/node] 2: 0x55eb85d53435 node::OnFatalError(char const, char const) [/usr/bin/node] 3: 0x55eb85eba902 v8::Utils::ReportOOMFailure(v8::internal::Isolate, char const, bool) [/usr/bin/node] 4: 0x55eb85ebab68 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate, char const, bool) [/usr/bin/node] 5: 0x55eb8603c616 [/usr/bin/node] 6: 0x55eb8607016b v8::internal::EvacuateNewSpaceVisitor::Visit(v8::internal::HeapObject, int) [/usr/bin/node] 7: 0x55eb8607a629 void v8::internal::LiveObjectVisitor::VisitBlackObjectsNoFail<v8::internal::EvacuateNewSpaceVisitor, v8::internal::MajorNonAtomicMarkingState>(v8::internal::MemoryChunk, v8::internal::MajorNonAtomicMarkingState, v8:: internal::EvacuateNewSpaceVisitor, v8::internal::LiveObjectVisitor::IterationMode) [/usr/bin/node] 8: 0x55eb8608fbb6 v8::internal::FullEvacuator::RawEvacuatePage(v8::internal::MemoryChunk, long) [/usr/bin/node] 9: 0x55eb8606a5c5 v8::internal::Evacuator::EvacuatePage(v8::internal::MemoryChunk) [/usr/bin/node] 10: 0x55eb8606a897 v8::internal::PageEvacuationTask::RunInParallel(v8::internal::ItemParallelJob::Task::Runner) [/usr/bin/node] 11: 0x55eb86061605 v8::internal::ItemParallelJob::Task::RunInternal() [/usr/bin/node] 12: 0x55eb86061a23 v8::internal::ItemParallelJob::Run() [/usr/bin/node] 13: 0x55eb8607bb7d void v8::internal::MarkCompactCollectorBase::CreateAndExecuteEvacuationTasks<v8::internal::FullEvacuator, v8::internal::MarkCompactCollector>(v8::internal::MarkCompactCollector, v8::internal::ItemParallelJob, v8::int ernal::MigrationObserver, long) [/usr/bin/node] 14: 0x55eb8608e273 v8::internal::MarkCompactCollector::EvacuatePagesInParallel() [/usr/bin/node] 15: 0x55eb8608e41b v8::internal::MarkCompactCollector::Evacuate() [/usr/bin/node] 16: 0x55eb86092b1d v8::internal::MarkCompactCollector::CollectGarbage() [/usr/bin/node] 17: 0x55eb8604cd0b v8::internal::Heap::MarkCompact() [/usr/bin/node] 18: 0x55eb8604d62b v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/usr/bin/node] 19: 0x55eb8604e278 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/bin/node] 20: 0x55eb860507bc v8::internal::Heap::AllocateRawWithLightRetry(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [/usr/bin/node] 21: 0x55eb86050ac1 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [/usr/bin/node] 22: 0x55eb8601721a v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType) [/usr/bin/node] 23: 0x55eb86330c2d v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long, v8::internal::Isolate*) [/usr/bin/node] 24: 0x55eb86686fb9 [/usr/bin/node] × Error Unhandled exception when building "Builtin::File::build/iosevka-wpaopao/iosevka-wpaopao-extendedlight.ttf": { signal: 'SIGABRT' }



---

`npm run build -- ttf::iosevka-wpaopao`

The building get stuck long around 74% and fails for lack of memory, even in machine with 32GB of real memory. The line where it stops is:
`♦ node gen/generator -o build/iosevka-wpaopao/iosevka-wpaopao-bolditalic.tmp.otd --charmap build/iosevka-wpaopao/iosevka-wpaopao-bolditalic.charmap --family 'Iosevka wPaopao' --ver 3.0.0-beta.3 --menu-weight 960 --menu-slant italic --` (cut short)

I don't know if it is relevant, but basically the same variant with normal weights and width of 500 works properly.

It is unrelated, but since it is a simple question I'd like to avoid to open another issue. It is possible to set up the names of the lighter and heavier variants? As you can see from the `private-build-plans.toml` above I made only three variants and I'd to call them: "light," "regular," and "bold". Instead n the system they appear as "extralight," "regular," and "extrabold."
be5invis commented 4 years ago

Looks like some broken geometry took too much memory. Also, the buildPlans.iosevka-wpaopao.weights.<weight> does not support arbitrary number -- only 100, 200, 300, ..., 900 are supported.

paolobolzoni commented 4 years ago

What about the unrelated question at the end?

be5invis commented 4 years ago

Change the "menu" value in your weights, like set "menu" to 300 will make the font's menu weight (the weight that the OS thinks) be "light".

paolobolzoni commented 4 years ago

Thanks for all the good work. Time to close this one then.

paolobolzoni commented 4 years ago

I am afraid I need to reopen. I adapted the weights in the build-plans.toml. But the result has the filename correct, but the metadata inside the font is not. So in programs' menus the font name is still the old one.

Filename correct:

$ ls -1
iosevka-paopao-bold.ttf
iosevka-paopao-bolditalic.ttf
iosevka-paopao-italic.ttf
iosevka-paopao-light.ttf
iosevka-paopao-lightitalic.ttf
iosevka-paopao-regular.ttf

Metadata is not:

$ file *
iosevka-paopao-bold.ttf:        TrueType Font data, 17 tables, 1st "GDEF", 30 names, Macintosh, Copyright (c) 2015-2019 Belleve Invis.Iosevka Paopao ExtraboldRegularIosevka Paopao Extrabold 3
iosevka-paopao-bolditalic.ttf:  TrueType Font data, 17 tables, 1st "GDEF", 30 names, Macintosh, Copyright (c) 2015-2019 Belleve Invis.Iosevka Paopao ExtraboldItalicIosevka Paopao Extrabold It
iosevka-paopao-italic.ttf:      TrueType Font data, 17 tables, 1st "GDEF", 30 names, Macintosh, Copyright (c) 2015-2019 Belleve Invis.Iosevka PaopaoItalicIosevka Paopao Italic 3.0.0-beta.3Ios
iosevka-paopao-light.ttf:       TrueType Font data, 17 tables, 1st "GDEF", 30 names, Macintosh, Copyright (c) 2015-2019 Belleve Invis.Iosevka Paopao ExtralightRegularIosevka Paopao Extralight
iosevka-paopao-lightitalic.ttf: TrueType Font data, 17 tables, 1st "GDEF", 30 names, Macintosh, Copyright (c) 2015-2019 Belleve Invis.Iosevka Paopao ExtralightItalicIosevka Paopao Extralight 
iosevka-paopao-regular.ttf:     TrueType Font data, 17 tables, 1st "GDEF", 30 names, Macintosh, Copyright (c) 2015-2019 Belleve Invis.Iosevka PaopaoRegularIosevka Paopao Regular 3.0.0-beta.3I
$

However, the wide version I mentioned in the first message compiles successfully after setting up the weights as you said.

be5invis commented 4 years ago

Oh I see you want to change the shape only but not the menu name, so you should configure like this:

[buildPlans.iosevka-paopao.weights.light]
shape = 200
menu  = 300
css   = 300

[buildPlans.iosevka-paopao.weights.regular]
shape = 400
menu  = 400
css   = 400

[buildPlans.iosevka-paopao.weights.bold]
shape = 800
menu  = 700
css   = 700
paolobolzoni commented 4 years ago

And finally I got my own personal variant! Thanks for all the good work!

https://github.com/paolobolzoni/useful-conf/tree/master/iosevka

Can I use this font for presentations?

be5invis commented 4 years ago

The Font is OFL, means you can freely use it. Closed.