mirror of
https://github.com/Leonmmcoset/CMLeonOS.git
synced 2026-03-03 15:30:27 +00:00
修改字体
This commit is contained in:
2
Build.bat
Normal file
2
Build.bat
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
"D:\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\amd64\MSBuild.exe" "CMLeonOS.csproj" /t:Build /p:Configuration=Fixed_Release /p:Platform=x64
|
||||||
|
@REM "C:\Program Files (x86)\VMware\VMware Workstation\vmplayer.exe" "C:\Users\leon\AppData\Roaming\Cosmos User Kit\Build\VMware\Workstation\Cosmos.vmx"
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<StartCosmosGDB>False</StartCosmosGDB>
|
<StartCosmosGDB>False</StartCosmosGDB>
|
||||||
<VisualStudioDebugPort>Pipe: Cosmos\Serial</VisualStudioDebugPort>
|
<VisualStudioDebugPort>Pipe: Cosmos\Serial</VisualStudioDebugPort>
|
||||||
<CosmosDebugPort>Serial: COM1</CosmosDebugPort>
|
<CosmosDebugPort>Serial: COM1</CosmosDebugPort>
|
||||||
<Launch>VMware</Launch>
|
<Launch>HyperV</Launch>
|
||||||
<Profile>VMware</Profile>
|
<Profile>VMware</Profile>
|
||||||
<Description>Use VMware Player or Workstation to deploy and debug.</Description>
|
<Description>Use VMware Player or Workstation to deploy and debug.</Description>
|
||||||
<PxeInterface>192.168.0.8</PxeInterface>
|
<PxeInterface>192.168.0.8</PxeInterface>
|
||||||
@@ -30,7 +30,37 @@
|
|||||||
<VBEResolution>800x600x32</VBEResolution>
|
<VBEResolution>800x600x32</VBEResolution>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
<WarningLevel>8</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<WarningLevel>8</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||||
|
<WarningLevel>8</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<WarningLevel>8</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Fixed_Release|AnyCPU'">
|
||||||
|
<WarningLevel>8</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Fixed_Release|x64'">
|
||||||
|
<WarningLevel>8</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<None Remove="font.psf" />
|
||||||
|
<None Remove="Solarize.12x29.psf" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="font.psf" />
|
||||||
<EmbeddedResource Include="Wallpapers\wallpaper.bmp" />
|
<EmbeddedResource Include="Wallpapers\wallpaper.bmp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
34
Kernel.cs
34
Kernel.cs
@@ -1,19 +1,23 @@
|
|||||||
|
using CMLeonOS.Logger;
|
||||||
|
using CMLeonOS.Settings;
|
||||||
using Cosmos.HAL;
|
using Cosmos.HAL;
|
||||||
|
using Cosmos.HAL.BlockDevice;
|
||||||
|
using Cosmos.HAL.Drivers.Video;
|
||||||
using Cosmos.System.FileSystem;
|
using Cosmos.System.FileSystem;
|
||||||
using Cosmos.System.FileSystem.FAT;
|
using Cosmos.System.FileSystem.FAT;
|
||||||
using Cosmos.System.FileSystem.VFS;
|
using Cosmos.System.FileSystem.VFS;
|
||||||
|
using Cosmos.System.Graphics;
|
||||||
|
using Cosmos.System.Graphics.Fonts;
|
||||||
using Cosmos.System.Network.Config;
|
using Cosmos.System.Network.Config;
|
||||||
using Cosmos.System.Network.IPv4.UDP.DHCP;
|
|
||||||
using Cosmos.HAL.BlockDevice;
|
|
||||||
using Cosmos.System.Network.IPv4;
|
using Cosmos.System.Network.IPv4;
|
||||||
|
using Cosmos.System.Network.IPv4.UDP.DHCP;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection.Metadata.Ecma335;
|
using System.Reflection.Metadata.Ecma335;
|
||||||
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Sys = Cosmos.System;
|
using Sys = Cosmos.System;
|
||||||
using CMLeonOS.Logger;
|
|
||||||
using CMLeonOS.Settings;
|
|
||||||
|
|
||||||
namespace CMLeonOS
|
namespace CMLeonOS
|
||||||
{
|
{
|
||||||
@@ -32,8 +36,30 @@ namespace CMLeonOS
|
|||||||
public static Cosmos.HAL.NetworkDevice NetworkDevice = null;
|
public static Cosmos.HAL.NetworkDevice NetworkDevice = null;
|
||||||
public static string IPAddress = "Unknown";
|
public static string IPAddress = "Unknown";
|
||||||
|
|
||||||
|
[IL2CPU.API.Attribs.ManifestResourceStream(ResourceName = "CMLeonOS.font.psf")]
|
||||||
|
public static readonly byte[] file;
|
||||||
|
|
||||||
protected override void BeforeRun()
|
protected override void BeforeRun()
|
||||||
{
|
{
|
||||||
|
// 我认了,我用默认字体
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// PCScreenFont screenFont = PCScreenFont.LoadFont(file);
|
||||||
|
// VGAScreen.SetFont(screenFont.CreateVGAFont(), screenFont.Height);
|
||||||
|
// VGAScreen.SetGraphicsMode(VGADriver.ScreenSize.Size720x480, ColorDepth.ColorDepth32);
|
||||||
|
// }
|
||||||
|
// catch (Exception ex)
|
||||||
|
// {
|
||||||
|
// 我不认,我试着转换成Base64
|
||||||
|
// 我认了
|
||||||
|
PCScreenFont defaultFont = PCScreenFont.Default;
|
||||||
|
VGAScreen.SetFont(defaultFont.CreateVGAFont(), defaultFont.Height);
|
||||||
|
// Console.WriteLine($"{defaultFont.Height}");
|
||||||
|
// Console.WriteLine($"{defaultFont.Width}");
|
||||||
|
// VGAScreen.SetGraphicsMode(VGADriver.ScreenSize.Size720x480, ColorDepth.ColorDepth32);
|
||||||
|
// Console.WriteLine($"Error loading font: {ex.Message}");
|
||||||
|
// }
|
||||||
|
|
||||||
Console.WriteLine("Kernel load done!");
|
Console.WriteLine("Kernel load done!");
|
||||||
Console.WriteLine(@"-------------------------------------------------");
|
Console.WriteLine(@"-------------------------------------------------");
|
||||||
Console.WriteLine(@" ____ __ __ _ ___ ____ ");
|
Console.WriteLine(@" ____ __ __ _ ___ ____ ");
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ using Cosmos.Core.Memory;
|
|||||||
using UniLua;
|
using UniLua;
|
||||||
using Cosmos.HAL;
|
using Cosmos.HAL;
|
||||||
using CMLeonOS.Commands;
|
using CMLeonOS.Commands;
|
||||||
|
|
||||||
namespace CMLeonOS
|
namespace CMLeonOS
|
||||||
{
|
{
|
||||||
public class Shell
|
public class Shell
|
||||||
|
|||||||
Reference in New Issue
Block a user